ASP.NET Web API Self-Host with Windows Authentication

前端 未结 9 1309
不知归路
不知归路 2021-01-30 11:31

I am trying to use the ASP.NET Web API Self-Host option with Windows authentication so I can determine the logged on user and ultimately accept or reject the user based on their

9条回答
  •  甜味超标
    2021-01-30 12:13

    Here is a link to a short video explaining how to use authorization.

    http://www.asp.net/web-api/videos/getting-started/authorization

    In essence use the [Authorize] attribute on the class, catch the error and return an HTTP 401 response and then have the client detect it and go to the login page

提交回复
热议问题