0
kicks
Handling Authorization Failures for AJAX Requests in ASP.NET MVC Appli
Authorization failures in ASP.NET MVC applications are usually not something you worry about. The ASP.NET pipeline has solid support for this scenario and will redirect the user to your application’s login page for you automagically. Unfortunately, things become more complicated once you introduce AJAX requests into the mix. Without doing some extra work, you can create a bad user experience and increase the burden of developing AJAX-enabled client script. In this post, I’ll show you an elegant way to handle authorization failures that overcomes these problems.