in

Dot Net Mafia

Group site for developer blogs dealing with (usually) .NET, SharePoint 2013, SharePoint 2010, Office 365, SharePoint Online, and other Microsoft products, as well as some discussion of general programming related concepts.

Cory Robinson's Blog

Restricting authentication to aspx pages in your authentication module

In your httpmodule that you are using for authentication, in the handler for the AuthenticateRequest event, include these lines:

 

   34 HttpApplication httpApp = (HttpApplication) sender;

   35 

   36             // Only authenticate for aspx pages

   37             if (Path.GetExtension(HttpContext.Current.Request.Url.LocalPath.ToLower()) != ".aspx")

   38             {

   39                 HttpContext.Current.Response.StatusCode = 200;

   40                 HttpContext.Current.SkipAuthorization = true;

   41                 return;

   42             }

Read the complete post at http://www.dotnetmafia.com/Home/tabid/37/EntryID/136/Default.aspx

2012 dotnetmafia.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems