none
The HTTP request is unauthorized with client authentication scheme 'Negotiate'. The authentication header received from the server was 'Negotiate'. RRS feed

答案

全部回复

  • 你好,
    请问你是用IIS Host WCF的吗? 能够提供一下一个能够重现问题的项目吗?并且描述一下IIS上的配置.我看看是否能够重现该问题.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. Need a sample of a technique of Microsoft? Just check out CodeFx first! http://cfx.codeplex.com/
    2009年8月17日 5:04
    版主
  •            客户端调用前:
               wcfServiceProxyHttp.ClientCredentials.Windows.ClientCredential.UserName = "aaaa";
                wcfServiceProxyHttp.ClientCredentials.Windows.ClientCredential.Password = "0000";
                wcfServiceProxyHttp.ClientCredentials.Windows.ClientCredential.Domain = "localhost";
    服务:      <!--<netTcpBinding>
          <binding name="BindingConfigration">
            <security mode="Transport">
              <transport clientCredentialType="Windows" />
            </security>
          </binding>
        </netTcpBinding>-->
    客户端配置:
                       <security mode="Transport">
                            <transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" />
                            <message clientCredentialType="Windows" />
                        </security>
    Frank Xu Lei--谦卑若愚,好学若饥
    专注于.NET平台下分布式应用系统开发和企业应用系统集成
    Focus on Distributed Applications Development and EAI based on .NET
    欢迎访问老徐的中文技术博客:Welcome to My Chinese Technical Blog
    欢迎访问微软WCF中文技术论坛:Welcome to Microsoft Chinese WCF Forum
    欢迎访问微软WCF英文技术论坛:Welcome to Microsoft English WCF Forum
    2009年8月17日 5:19
    版主
  • 我知道了.一般来说这个错误是
     wcfServiceProxyHttp.ClientCredentials.Windows.ClientCredential.UserName = "aaaa";
                wcfServiceProxyHttp.ClientCredentials.Windows.ClientCredential.Password = "0000";
                wcfServiceProxyHttp.ClientCredentials.Windows.ClientCredential.Domain = "localhost";

    这三个里至少有一个不正确.比如密码错了等等.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. Need a sample of a technique of Microsoft? Just check out CodeFx first! http://cfx.codeplex.com/
    2009年8月17日 5:25
    版主
  • 谢谢回复,已经解决:
     因为项目是基于netTcpBinding的Transport 安全模式下Windows域账号验证。
      早期的项目是在WSHttpBinding上修改的。'Negotiate'在WS绑定上才有。
    宿主程序没有编译导致的错误。
    重新设置客户端代码,编译托管宿主程序即可。



    参考资料:

    http://social.microsoft.com/Forums/zh-CN/wcfzhchs/thread/9a90c6ac-f5f6-4619-bcba-ffb4681ba482

    http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/3b72a74d-41a9-4cbe-a1cc-3da4a34f376f

    Frank Xu Lei--谦卑若愚,好学若饥
    专注于.NET平台下分布式应用系统开发和企业应用系统集成
    Focus on Distributed Applications Development and EAI based on .NET
    欢迎访问老徐的中文技术博客:Welcome to My Chinese Technical Blog
    欢迎访问微软WCF中文技术论坛:Welcome to Microsoft Chinese WCF Forum
    欢迎访问微软WCF英文技术论坛:Welcome to Microsoft English WCF Forum
    2009年8月18日 6:28
    版主