| I wanted to make an application page become accessible for anonymous users but I was constantly being prompted with a logon box whenever I told the the page that it should inherit from a custom class like so <%@ Page Language="C#" MasterPageFile="~/_layouts/simple.master" Inherits="zevenseas.ApplicationPages.CustomClass" %>
So what to do? Well the first thing I found that I should inherit my CustomClass from the UnsecuredLayoutsPageBase instead of the LayoutsPageBase. Secondly, by inheriting from this other page, I have gained access to the following property called AllowAnonymousAccess, which should be overriden like this:
protected override bool AllowAnonymousAccess
{
get
{
return true;
}
}
Once overridden and setting it to true, your custom application page becomes accessible for anonymous users as well ;)
Technorati Tags: SharePoint |