Today I am going to discuss on how to design anonymous access application page. This is a common problem that many company developer faces. They always ask that designing such a page is always difficult. You will have site running in windows authentication or in forms authentication. If the entire site is anonymous then it is altogether a different story.
So let us discuss how we can design such application page that can be accessed by the anonymous users as well.
Normally we inherit the application page by LayoutPageBase class, right? Yes, so first thing to note is instead of inheriting from this class, we are required to inherit from class named UnsecuredLayoutsPageBase.
In addition to this, you also need to override one more method which is
protected override bool AllowAnonymousAccess
{
get
{
return true;
}
}
Once you are done with these two settings, you are done with this. Try to achieve this and let me know your feedback.
Thank you
2 comments:
But nothing is happening,the result is same, it every time redirect to the customize login page .What should i do ??
first you have to allow webapplication to anonymous access from central admin.
else webapplication setting it self redirects you to login page.
Post a Comment