Topic: Some section authentification in Web.config
I want to add a little forms authentification for the application.
I use it in the basic application, but there are 2 pages where separate login and the password is necessary and it is necessary for me to check parameter Request. IsAuthenticated and it should not be true if the user was in basic application.
In a separate folder I cannot add the given pages as I need to leave correct structure of links, namely - "site/a.aspx" and "site/b.aspx".
<location path = "a.aspx"> <system.web> <authorization> <allow users = "admin"/> <deny users = "*"/> </authorization> </system.web> </location> <location path = "b.aspx"> <system.web> <authorization> <allow users = "admin"/> <deny users = "*"/> </authorization> </system.web> </location> <system.web> ... <authentication mode = "Forms"> <forms name = "ManageUsers" timeout = "5"> <credentials passwordFormat = "MD5"> <user name = "admin" password = "4cfdc2e157eefe6facb983b1d557b3a1"/> </credentials> </forms> </authentication> ...
The moderator: we Learn to use tags of design of the code - FAQ
If I add authentification in location at reversal to page I receive the following error - " It is an error to use a section registered as allowDefinition ='MachineToApplication ' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS. "