【发布时间】:2015-07-08 21:01:49
【问题描述】:
我想重现 wcf 问题:http 请求被客户端身份验证方案“匿名”禁止
我们在我们的产品中使用 wcf 服务,并且我们已将 wcf 服务托管为 Windows 服务(自托管服务),并且该 wcf 服务正被一个小型 Windows 客户端应用程序使用。
在我们的环境中一切正常。但是,我们的一位客户报告说,当他们从远程客户端连接 客户端应用程序 时,他们收到错误“HTTP 请求被客户端身份验证方案'匿名' 禁止”机器。
在这里,我的问题是,任何人都可以帮助我在我们的环境中重新生成这个问题,以便我们可以给出完美的修复。
ServiceApp.config
<bindings>
<wsHttpBinding>
<binding name="MyBinding" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="100" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="2147483647" />
<reliableSession inactivityTimeout="24.00:00:00" />
<security mode="None">
<message clientCredentialType="None" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<services>
<service behaviorConfiguration="MyBehaviour" name="WcfServer.CalculatorService">
<endpoint address="http://localhost:7000/Test" behaviorConfiguration="MyEndPointBehavior"
binding="wsHttpBinding" bindingConfiguration="MyBinding"
name="EndPt_Service" contract="WcfServer.ICalculator"/>
</service>
</services>
clientapp.config
<bindings>
<wsHttpBinding>
<binding name="CalBinding" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="100" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="2147483647" />
<reliableSession inactivityTimeout="24.00:00:00" />
<security mode="None">
<message clientCredentialType="None" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<client>
<endpoint address="http://RemoteServerName:7000/Test" behaviorConfiguration="CalEndPointBehavior"
binding="wsHttpBinding" contract="WcfServer.ICalculator"
name="EndPt_Calc" bindingConfiguration="CalBinding"/>
</client>
【问题讨论】:
标签: c# wcf http wcf-binding wcf-security