We have a controller, /exampleUrl, that talks to an external API. Our frontend uses AJAX to talk to the controller.
The external API returns an error sometimes and then I want to send a 401 statuscode back to the frontend.I've noticed that when sending back a 401 to the client, EPI hooks in and redirects me to the loginpage for the CMS...can I somehow turn this off?
I've added this to my web.config but it doesn't work...what am I missing?
Heres the correct web.config entry...
<authentication mode="None" />
Solved it like this.
protected void Application_BeginRequest()
var startUrl = "/exampleUrl";
Response.SuppressFormsAuthenticationRedirect = true;