C# Web api windows授权被拒绝
我希望在我的web api中使用windows身份验证,但我总是收到以下消息:“此请求的授权已被拒绝。”我是否遗漏了什么 IIS设置: Web配置: 控制器:C# Web api windows授权被拒绝,c#,.net,C#,.net,我希望在我的web api中使用windows身份验证,但我总是收到以下消息:“此请求的授权已被拒绝。”我是否遗漏了什么 IIS设置: Web配置: 控制器: [HttpGet] [Route("api/testauthentication")] [Authorize] public IHttpActionResult TestAutentication() { return Ok(true); } 解决方案在这里:
[HttpGet]
[Route("api/testauthentication")]
[Authorize]
public IHttpActionResult TestAutentication()
{
return Ok(true);
}
解决方案在这里: