Authorization has been denied for this request - New Web API Project

前端 未结 4 700
渐次进展
渐次进展 2021-01-30 10:58

I just created new Web API project (using MVC) in visual studio 2015 and for the testing purpose, I ran that project but ended up below error.

After running the project,

4条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-30 11:27

    After remove a authorize attribute on you method in a controller like [Authorize] or even a manual authorization attribute like this [BasicAuthentication] that you created (expect you handle it), you have to put this attribute [AllowAnonymous] on you method name.

提交回复
热议问题