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?