gpt4 book ai didi

html - HTTP 请求未经客户端身份验证方案 'Anonymous' 授权。从服务器收到的身份验证 header 是 'NTLM’

转载 作者:技术小花猫 更新时间:2023-10-29 12:38:26 25 4
gpt4 key购买 nike

我有一个用 VB.NET 编写的 ASP.NET Web 应用程序。应用程序的一部分对内部 ASMX 文件进行 AJAX 调用,该文件又调用远程 Web 服务,该服务只是一个 ASMX 文件。通常这工作正常并且已经部署了几次并且工作正常。然而,一位客户正在从 AJAX 调用中获取消息:

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

我搜索了大量试图解决此问题的网站,但我似乎找不到任何适合我的答案。

我一直无法在我的测试服务器上复制错误,它与客户端 Win2003 IIS6 相同。

远程Web服务部署在Windows 2008 r2 – IIS7.5上。远程服务仅使用“匿名”身份验证进行部署。客户端部署设置为匿名和“集成 Windows 身份验证”。我已尝试更改两种实现的身份验证级别,但无法重现该问题。我最接近的是当我将远程服务 IIS 身份验证设置为

The HTTP request is unauthorized with client authentication scheme 'Ntlm'. The authentication header received from the server was ''.

在 web.config 文件中,对远程服务的引用是:

<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="SVCMappingSoap" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384"/>
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None" realm=""/>
<message clientCredentialType="UserName" algorithmSuite="Default"/>
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://svc.website.com/services/myService.asmx" binding="basicHttpBinding" bindingConfiguration="SVCMappingSoap" contract="SVCMappingService.SVCMappingSoap" name="SVCMappingSoap"/>
</client>
</system.serviceModel>

我尝试更改 <security> 中的一些设置节,但仍然无法复制。

最佳答案

我不确定您的整个服务器设置。

<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None" realm=""/>
</security>

请尝试以下配置,而不是上面的配置

<security mode="TransportCredentialOnly">
<transport clientCredentialType="Ntlm"/>
<message clientCredentialType="UserName" algorithmSuite="Default"/>
</security>

请浏览以下链接,您可以了解更多信息,也可以根据您的要求更改配置:

关于html - HTTP 请求未经客户端身份验证方案 'Anonymous' 授权。从服务器收到的身份验证 header 是 'NTLM’,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7677611/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com