问题的工作是,我不能让Windows身份验证与工作的wsHttpBinding。WCF Windows身份验证不WsHttpBinding的
这是配置:
<services>
<service name="WcfService1.Service1">
<endpoint address="" bindingConfiguration="testbinding" contract="WcfService1.IService1" binding="wsHttpBinding"/>
</service>
</services>
<bindings>
<wsHttpBinding>
<binding name="testbinding">
<security mode="Transport">
<transport clientCredentialType="Windows"/>
</security>
</binding>
</wsHttpBinding>
</bindings>
这是从服务器试图调用的方法时的响应: HTTP请求是未经授权的客户端身份验证方案协商'。从服务器收到的验证头是'Negotiate oXMwcaADCgEBomoEaGBmBgkqhkiG9xIBAgIDAH5XMFWgAwIBBaEDAgEepBEYDzIwMTcwODE2MjA1MjQwWqUFAgMK8G2mAwIBKakOGwxDT1JQLlNBQUIuU0WqGjAYoAMCAQGhETAPGw1jb3JwYXBwbDU5ODgk'。 也有一个内部异常说法: “目标主要名称不正确”
我已经安装IIS中的新网站新的用于测试目的启用Windows身份验证和其他残疾的一切(我没有做任何ASP模拟/双跳)。 Windows身份验证提供商是Negotiate,Ntlm。内核模式认证已启用。 应用程序池与Active Directory服务帐户一起运行。 最终的目标是使用Kerberos进行身份验证,但由于它甚至不能使用Ntlm,所以我还没有开始使用SPN以及那些让Kerberos工作的东西。
如果我更改应用程序池与“ApplicationPoolIdentity”,而不是AD服务帐户运行但它确实工作? 我必须拥有使用AD服务帐户运行的应用程序池。
如果我改变配置来:
<services>
<service name="WcfService1.Service1">
<endpoint address="" bindingConfiguration="hbinding" contract="WcfService1.IService1" binding="basicHttpsBinding"/>
</service>
</services>
<bindings>
<basicHttpsBinding>
<binding name="hbinding">
<security mode="Transport">
<transport clientCredentialType="Windows"/>
</security>
</binding>
</basicHttpsBinding>
它工作正常(保持AD服务帐户为好),这是为什么? 我不想使用basicHttpsBinding
我看到在客户端配置文件的差异(使用wcftestclient),使用wshttp它时:
<identity>
<userPrincipalName value="[email protected]" />
</identity>
是否有一些与此有关? (只是猜测疯狂这里)
终点为https,基于Windows Server 2012R2 IIS 8。
谢谢你的答案,但我不能使用NTLM(由于安全限制) 我设法解决它(回答以下) – user2782999