标题几乎说明了一切,我想配置我的 WCF 服务,以便用户只能使用 Kerberos 进行身份验证,而不是 NTLM(用于调试目的)。有什么办法吗?
在客户端,显然是通过设置 clientCredentials/windows/@allowNtlm="false" 来完成的,但服务器似乎没有等效的属性。
我的配置:
<?xml version="1.0"?>
<configuration>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior>
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="rest">
<webHttp helpEnabled="true" defaultOutgoingResponseFormat="Xml" automaticFormatSelectionEnabled="false" faultExceptionEnabled="true" />
</behavior>
</endpointBehaviors>
</behaviors>
<services>
<service name="MyService">
<endpoint address="" binding="webHttpBinding" bindingConfiguration="rss" contract="MyProject.IMyService" behaviorConfiguration="rest" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:8732/Design_Time_Addresses/MyProject/MyService/"/>
</baseAddresses>
</host>
</service>
</services>
<bindings>
<webHttpBinding>
<binding name="rss">
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Windows" />
</security>
</binding>
</webHttpBinding>
</bindings>
</system.serviceModel>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
</configuration>