【发布时间】:2014-10-14 14:58:12
【问题描述】:
我有一个服务。我可以用 http 浏览它的 svc 文件。但是,我无法通过 https 访问它。我需要对其进行一些配置更改吗? 这是一个示例配置文件
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0"/>
</system.web>
<system.serviceModel>
<client>
<endpoint address="http://localhost/Sum_Wcf/Service1.svc" binding="webHttpBinding"
behaviorConfiguration="EndPointBehavior" contract="SumServiceReference.IService1" name="WebHttpBinding_Well" />
</client>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" aspNetCompatibilityEnabled="true"/>
<standardEndpoints>
<webScriptEndpoint>
<standardEndpoint name="" crossDomainScriptAccessEnabled="true">
</standardEndpoint>
</webScriptEndpoint>
</standardEndpoints>
<behaviors>
<endpointBehaviors>
<behavior name="EndPointBehavior">
<enableWebScript />
</behavior>
</endpointBehaviors>
</behaviors>
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
<directoryBrowse enabled="true"/>
</system.webServer>
</configuration>
这是服务器端配置文件。 客户端元素在那里,因为它是一个演示应用程序,我在同一个应用程序中也有一个客户端应用程序,用于测试目的。
【问题讨论】:
-
Google 出现了这个问题,其中包括:SSL for webHttpBinding
-
您的 web.config 似乎与客户端配置和服务器配置混合在一起。那么配置文件是用在客户端还是服务端呢?
-
这是一个服务器配置
标签: asp.net wcf service https config