Some times we may need to allow users to access some pages with out login such as help pages or contact us, home page…etc., with out login in to the application.
If we want to allow user to access Help.aspx page before login, we have to add that page details in web.config file as below.
<configuration> <locationpath="/Help.aspx"> <system.web> <authorization> <allowusers="?"/> </authorization> </system.web> </location>
If we want to add more than one page to allow then we have to add corresponding location tag entry in the config file.
In forms authentication, if we are using images in another folder in login page than images will not be displayed due to the authentication was not done when user open the login page so we need to allow the user to access the images folder before login. To allow user to access images folder before login we have to add below tag in config file.
<locationpath="images"> <system.web> <authorization> <allowusers="?"/> </authorization> </system.web> </location>