Creating a SharePoint Application Page for Anonymous Access
From time to time, you may need to create a few SharePoint application pages for anonymous users. Like log on page, the page to recover or reset passwords, a page to guide through the registration processes, etc. Besides to set up you SharePoint site to allow anonymous access, the key here is that you cannot use the default LayoutsPageBase base class for your page because it would trigger SharePoint to prompt anonymous users to log on.
Instead, you need to use another base class for your anonymous application page called UnsecuredLayoutsPageBase. You can find its MSDN reference at: http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.unsecuredlayoutspagebase.aspx
Your page class would look like this:
public partial class ApplicationPage1 : UnsecuredLayoutsPageBase
protected void Page_Load(object sender, EventArgs e)
Zewei Song, Ph.D.
MCPD, MCTS: .NET 3.5, MOSS AppDev, Configuration
Enterprise Services, Microsoft Corporation