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>
  • 相关阅读:
    django 数据库内容管理(admin)
    django QuerySet的缓存机制(高效使用)
    Uniapp 离线打包
    idea启动Tomcat时控制台中文乱码问题
    windows 在服务中启动tomcat 配置jvm参数
    new File("E:") 文件路径变成项目所在的文件夹
    window10 开启ftp服务端
    MySQL没有默认my.ini文件
    mysql5.7 修改sql_mode配置
    一台服务器,多个Tomcat运行相同的系统,一个浏览器访问时cookie相互影响
  • 原文地址:https://www.cnblogs.com/mrfangzheng/p/1397651.html
Copyright © 2011-2022 走看看