How to protect layouts aspx from anonymous access.
How to protect layouts aspx from anonymous access in sharepoint 2013?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Ramesh PalaniappanPosted Sep 7, 2016, 12:04 PM
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: