【发布时间】:2018-11-26 06:08:15
【问题描述】:
我必须在服务器上托管的服务上实施“Windows 身份验证”。
我正在使用“wsHttpBinding”。其中“消息”是默认的安全模式。
以下是我的服务器配置:
web.config
<authentication mode="Windows" />
<services>
<service name="WCFWsHttpBindingHttps.Service1" behaviorConfiguration="WCFWsHttpBindingHttps.Service1Behavior">
<!-- Service Endpoints -->
<endpoint address="" binding="wsHttpBinding" contract="WCFWsHttpBindingHttps.IService1">
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="WCFWsHttpBindingHttps.Service1Behavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
尽管进行了所有配置,但我无法访问我的服务。
任何人都可以通知我在哪里出错或我错过了任何配置。
【问题讨论】:
-
你应该定义一个安全模式
TransportCredentialOnly和<transport clientCredentialType="Windows" />的绑定 -
@Aria 在 wsHttpBinding 我们没有“TransportCredentialOnly”。我需要使用“wsHttpBinding”和安全模式作为“消息”来实现 Windows 身份验证。
标签: wcf iis windows-authentication wshttpbinding