Handling Unauthorised Ajax Requests in ASP.NET MVC App

The following post describes an application-wide method of handling unauthorised Ajax posts within an ASP.NET MVC application. Modifying the Authorize attribute as per the example below shows how HandleUnauthorizedRequest can be overridden, returning a Ajax401Response when using Ajax. You’re then able to intercept all requests using jQuery and process them accordingly. Custom Authorize Attribute using …

Handling Unauthorised Ajax Requests in ASP.NET MVC App Read More »