iis was 5002 协议绑定在IIS或WAS配置中的站点级别配置 - IIS - 服务器之家

服务器之家

专注于服务器技术!
当前位置:首页 > Web服务器 > IIS

iis was 5002 协议绑定在IIS或WAS配置中的站点级别配置

发布时间:2017-04-21 来源:服务器之家

报这个错说明配置文件没有配置正确

以下使用的是.Net Framwork4 框架。

Web.config文件

错误范例:

<configuration>
<system.web>
<compilation debug="false" targetFramework="4.0" />
</system.web>
<system.serviceModel>
<services>
<service name="WCFServiceApp.User">
binding="basicHttpBinding" bindingConfiguration="" contract="WCFServiceApp.IUser" />
<endpoint binding="wsHttpBinding" bindingConfiguration="" contract="WCFServiceApp.IUser" />
<endpoint address="basic" binding="basicHttpBinding" bindingConfiguration=""
contract="WCFServiceApp.IUser" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- 为避免泄漏元数据信息,请在部署前将以下值设置为 false 并删除上面的元数据终结点 -->
<serviceMetadata httpGetEnabled="true"/>
<!-- 要接收故障异常详细信息以进行调试,请将以下值设置为 true。在部署前设置为 false 以避免泄漏异常信息-->
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="false" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration></span>

正确范例:

<configuration>
<system.web>
<compilation debug="false" targetFramework="4.0" />
</system.web>
<system.serviceModel>
<services>
<service name="WCFServiceApp.User">
<span style="color:#FF0000;"><endpoint address="/Service.svc"</span>
binding="basicHttpBinding" bindingConfiguration="" contract="WCFServiceApp.IUser" />
<endpoint binding="wsHttpBinding" bindingConfiguration="" contract="WCFServiceApp.IUser" />
<endpoint address="basic" binding="basicHttpBinding" bindingConfiguration=""
contract="WCFServiceApp.IUser" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- 为避免泄漏元数据信息,请在部署前将以下值设置为 false 并删除上面的元数据终结点 -->
<serviceMetadata httpGetEnabled="true"/>
<!-- 要接收故障异常详细信息以进行调试,请将以下值设置为 true。在部署前设置为 false 以避免泄漏异常信息-->
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="false" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>
</span>