Corey Roth and Friends Blogs

Group site for developer blogs dealing with (usually) Ionic, .NET, SharePoint, Office 365, Mobile Development, 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;


   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

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