简体   繁体   English

突然得到:HTTP 请求未经客户端身份验证方案“协商”授权

[英]Suddenly getting: The HTTP request is unauthorized with client authentication scheme 'Negotiate'

During a debugging session of a dotnet framework application I started getting:在 dotnet 框架应用程序的调试会话期间,我开始得到:

The HTTP request is unauthorized with client authentication scheme 'Negotiate'. HTTP 请求未经授权,客户端身份验证方案为“协商”。 The authentication header received from the server was 'Negotiate,NTLM,Basic realm=...从服务器收到的身份验证标头是“协商,NTLM,基本领域= ...

after launching the web project successfully for hours on IIS.在 IIS 上成功启动 Web 项目数小时后。

My .vs/{solutionName}/config/applicationhost.config has windows auth with negotiate:我的 .vs/{solutionName}/config/applicationhost.config 有带有协商的 Windows 身份验证:

<windowsAuthentication enabled="true">
    <providers>
           <add value="Negotiate" />
           <add value="NTLM" />
    </providers>
</windowsAuthentication>

Excatly the same settings for IIS: IIS 的设置完全相同:

C:\\Program Files (x86)\\IIS Express\\AppServer\\applicationhost.config C:\\Program Files (x86)\\IIS Express\\AppServer\\applicationhost.config

What could have happened to cause me to suddenly get this error?可能发生了什么导致我突然收到此错误?

i have tried clearing the cache for ie, but that did not work我曾尝试清除 ie 的缓存,但这没有用

Edit: I tried deleting the repo locally and cloning from remote, but this did not solve the issue, so there must be some local configuration outside of the repo that is causing this编辑:我尝试在本地删除 repo 并从远程克隆,但这并没有解决问题,所以在 repo 之外肯定有一些本地配置导致了这个

This was quite the edge case.这是非常极端的情况。

I had attempted to login to a web app, let's call it "BT", with incorrect credentials.我曾尝试使用不正确的凭据登录 Web 应用程序,我们称之为“BT”。 This caused Credential Manager on Windows to create a Windows credential for BT with the wrong username+password combination.这导致 Windows 上的凭据管理器使用错误的用户名 + 密码组合为 BT 创建 Windows 凭据。

The project I am working on authorizes towards BT during launch which resulted in the error.我正在从事的项目在启动期间向 BT 授权,这导致了错误。 I do not understand how, but apparently the credentials in Credential Manager were used instead of the default "use the logged in users credentials".我不明白如何,但显然使用凭据管理器中的凭据而不是默认的“使用登录的用户凭据”。 The solution in my case was to modify/delete the windows credential in the Credential Manager我的解决方案是在凭据管理器中修改/删除 Windows 凭据

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 HTTP请求未经授权使用客户端身份验证方案&#39;Ntlm&#39;。 从服务器收到的身份验证标头是“Negotiate,NTLM” - The HTTP request is unauthorized with client authentication scheme 'Ntlm'. The authentication header received from the server was 'Negotiate,NTLM' HTTP 请求未经客户端身份验证方案“Ntlm”授权 - The HTTP request is unauthorized with client authentication scheme 'Ntlm' WCF-TransportWithMessageCredential使用客户端身份验证方案“匿名”对HTTP请求进行未授权 - WCF-TransportWithMessageCredential The HTTP request is unauthorized with client authentication scheme 'Anonymous' Wcf服务异常“使用客户端身份验证方案未授权HTTP请求” - Wcf service exception “The HTTP request is unauthorized with client authentication scheme” 使用客户端身份验证方案“ Ntlm”对HTTP请求进行了未授权。从服务器收到的身份验证标头为“ NTLM” - The HTTP request is unauthorized with client authentication scheme 'Ntlm' The authentication header received from the server was 'NTLM' 客户端身份验证方案“ Ntlm”不允许HTTP请求 - HTTP request is not allowed for client authentication scheme “Ntlm” 客户端身份验证方案“匿名”禁止HTTP请求。 3 - The HTTP request was forbidden with client authentication scheme 'Anonymous'. 3 如何修复“客户端身份验证方案‘匿名’禁止 HTTP 请求” - How to fix "The HTTP request was forbidden with client authentication scheme 'Anonymous'" 添加WCF服务引用时,HTTP请求被禁止,客户端身份验证方案“匿名”错误 - The HTTP request was forbidden with client authentication scheme 'Anonymous' error, when adding WCF service reference 使用“协商授权”发送HTTP请求 - Send HTTP request with “Negotiate Authorization”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM