【发布时间】:2014-01-26 03:47:48
【问题描述】:
我正在使用ASP.NET 3.5 和C#。我有一个web-application 有一个WCF。我已经使用Bindings HTTP 和HTTPS 将它部署在服务器上。一切运作良好。
今天我在同一个站点上添加了两个HTTP 和HTTPS 的绑定,但with different host names。 (我已经注册了那个新域,并且我已经用我的 IP 地址指出了这一点)。突然,同一站点的WCF 停止工作。
我为IIS 中的两个站点执行此操作,并且它们都在WCF 调用上返回异常,但是login 和所有其他页面都工作正常。
web.config 的 ServiceModel 部分如下:
<system.serviceModel>
<bindings>
<webHttpBinding>
<binding name="webBindingHTTP">
<security mode="TransportCredentialOnly">
<transport clientCredentialType="None" />
</security>
</binding>
<binding name="webBindingHTTPS">
<security mode="Transport">
<transport clientCredentialType="None" />
</security>
</binding>
</webHttpBinding>
</bindings>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true">
</serviceHostingEnvironment>
<behaviors>
<endpointBehaviors>
<behavior name="ihrole.service.remoteBehavior">
<webHttp />
</behavior>
<behavior name="webHttpEnabled">
<webHttp/>
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior name="ihrole.service.remoteBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service behaviorConfiguration="ihrole.service.remoteBehavior" name="ihrole.service.remote">
<endpoint address="" behaviorConfiguration="ihrole.service.remoteBehavior" bindingConfiguration="webBindingHTTP" binding="webHttpBinding" contract="ihrole.service.Iremote" />
<endpoint address="" behaviorConfiguration="ihrole.service.remoteBehavior" bindingConfiguration="webBindingHTTPS" binding="webHttpBinding" contract="ihrole.service.Iremote" />
</service>
</services>
</system.serviceModel>
同样,我确实有另一个站点托管在同一个 IIS 上,它也有 HTTP 和 HTTPS 绑定。但是我还没有在这个网站上添加新的,WCF 电话在同样的情况下工作正常。
任何猜测或解决方案? 提前谢谢..
【问题讨论】:
-
使用
设置显示您的 Web.config -
@FlopScientist 我已经用服务模型设置更新了这个问题。
-
添加证书后出现完全相同的问题,原来 Skype 正在使用端口 443 并且 IIS 无法启动。只是尝试一下..
标签: asp.net wcf iis iis-7 wcf-binding