简体   繁体   English

Web API Windows授权被拒绝

[英]Web api windows authorization denied

I want windows authentication in my web api, but I always get the following message: "Authorization has been denied for this request." 我想在我的Web api中进行Windows身份验证,但是我总是收到以下消息:“该请求的授权已被拒绝。” Am I missing something? 我想念什么吗?

IIS settings: IIS设置:

在此处输入图片说明

Web config: 网页配置:

在此处输入图片说明

Controller: 控制器:

[HttpGet]
[Route("api/testauthentication")]
[Authorize]
public IHttpActionResult TestAutentication()
{
    return Ok(true);
}

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

相关问题 此请求的授权已被拒绝 - 新的 Web API 项目 - Authorization has been denied for this request - New Web API Project 使用API​​密钥验证创建ASP.NET Web API时,授权被拒绝 - Authorization has been denied when creating ASP.NET Web API with API Key validation 拒绝访问 - Windows 服务 Web API 控制器类 - Access Denied - Windows service web API controller class Azure AD 带有用于 Web API 的不记名令牌身份验证的 AD 无法正常工作,抛出错误,因为“此请求的授权已被拒绝”。 - Azure AD with Bearer token authentication for Web API not working throwing error as “Authorization has been denied for this request.” IdentityServer3 .Net Web API。 收到错误-该请求的授权被拒绝 - IdentityServer3 .Net Web API. Getting error - Authorization has been denied for this request 此请求的授权已被拒绝 - 桌面到 ASP.NET Web API - Authorization has been denied for this request - Desktop to ASP.NET Web API ASP.NET MVC4和Web API身份验证+授权(Windows 8和Web) - ASP.NET MVC4 and Web API Authentication + Authorization (Windows 8 and Web) 基于令牌的授权Web API - Token Based Authorization Web API Web API Controller 带参数授权 - Web API Controller Authorization with parameters Web API / OWIN,SignalR和授权 - Web API / OWIN, SignalR & Authorization
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM