【问题标题】:Unable to use basic authentication to access WCF web service无法使用基本身份验证访问 WCF Web 服务
【发布时间】:2011-09-10 11:08:59
【问题描述】:

我正在尝试配置 WCF 服务以允许 Windows/NTLM 和基本身份验证。不幸的是,鉴于此配置,只有 Windows/NTLM 有效,基本身份验证失败并显示 http status code of 401 Unauthorized

我们的 IIS 7.5 服务器配置为允许这两种类型的身份验证。

以下配置有什么问题导致基本身份验证无法正常工作?

<wsHttpBinding>
  <binding name="webBinding">
    <security mode="Transport">
      <transport clientCredentialType="Windows" />
      <transport clientCredentialType="Basic" realm="XXX.YYY.com" />
    </security>
  </binding>
</wsHttpBinding>

我也尝试过使用basicHttpBinding,因为论坛帖子表明,如果 WCF 认为密码是以明文形式传递的,则使用 wsHttpBinding might prevent basic authentication

【问题讨论】:

  • 您是否安装了像 Fiddler 或 Charles 甚至 Wireshark 这样的 HTTP 嗅探器?不?安装一个,然后发布结果。

标签: c# wcf kerberos wshttpbinding basichttpbinding


【解决方案1】:

我将创建两个端点,一个使用 Windows 凭据,另一个使用 Basic。

【讨论】:

  • Richard 我试过只使用基本的并且遇到了同样的问题。不管配置什么基本的http认证都不行。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多