I am using MVC with forms authentication and I need authentication bypass for one of my controllers, is it possible to bypass authentication for Controller(s)/Action(s).
I tried adding the below given configurations in the web.config file. But, that's not working for me.
<location path="Account">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>
Can anyone help in this regard.
Something like
[Authorize]
public class ValuesController : ApiController
{
[AllowAnonymous]
public HttpResponseMessage Get() { ... }
public HttpResponseMessage Post() { ... }
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.