Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to prevent a HttpUnauthorizedResult(401) from redirecting to login controller on my Api endpoint

I have a web application which provides an API in addition to the actual website. I have forms authentication enabled in my application...

Now my problem is in my API endpoints returning a HttpUnauthorizedResult redirects me to the login page....

How can I prevent the redirection from happening and just have a 401 status returned?

like image 669
Whimsical Avatar asked Jan 17 '12 12:01

Whimsical


1 Answers

This is fixed (as of March 30th):

https://aspnetwebstack.codeplex.com/workitem/15

like image 150
Brock Allen Avatar answered Sep 21 '22 19:09

Brock Allen