zoukankan      html  css  js  c++  java
  • WCF客户端调用IIS上WebService的安全问题

    异常

    The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Negotiate,NTLM'.

     

    解决方案

    1 配置IIS

    网站->属性->目录安全性->身份验证方法: 同时选中”匿名访问”和”集成Windows身份验证”

     

    2 配置WCF客户端的Config文件:

    有3处地方: 1)security mode, 2)end point的behaviorConfiguration, 3)behaviors

    <system.serviceModel>
        <bindings>
            <basicHttpBinding>
                <binding >
    
                    <readerQuotas  />             
                    <security mode="TransportCredentialOnly">
                        <transport clientCredentialType="Windows" proxyCredentialType="Windows" realm="" />
                        <message clientCredentialType="UserName" algorithmSuite="Default" />
                    </security>
    </binding> </basicHttpBinding> </bindings> <client> <endpoint ... behaviorConfiguration="ImpersonationBehavior"/> </client> <behaviors> <endpointBehaviors> <behavior name="ImpersonationBehavior"> <clientCredentials> <windows allowedImpersonationLevel="Impersonation"/> </clientCredentials> </behavior> </endpointBehaviors> </behaviors> </system.serviceModel>
  • 相关阅读:
    Snagit文字提取捕获技巧
    Snagit长截图或完整截图技巧
    Snagit基于图像模板预制图片布局
    Snagit从图片创建视频的技巧
    截图工具Snagit试用免费激活方法
    Camtasia快捷键大全
    Axure RP快捷键指令汇总
    113资讯网:安装程序进入Admin后台出现:SQLSTATE[HY000] [1045] Access denied for user'root'@'localhost' (using password: YES)
    部署LNMP环境——Yum安装(113资讯网)
    会过日子是什么样
  • 原文地址:https://www.cnblogs.com/mrfangzheng/p/1397651.html
Copyright © 2011-2022 走看看