Problem solve Get help with specific problems with your technologies, process and projects.

Can I place authentication type in a subfolder?

I am developing a Website using ASP.NET and VB.NET. I have two sections; one is for regular users and other is administrator (backoffice). Both have two different login page as it is requirement of client.

I have implementented authentication (form level) in the regular user section. But when I put the web.config file in a subfolder (administor section) to apply authentication, it gives me an error that says: "This folder is not root folder or not registered is IIS server".

To fix this I go to IIS right on the sub folder and open its properties. In Directory => Appliction setting I click on create. I try to run the admin section, and it gives me the error: "Could not load the page".

I want to know how to implement web.config in the subfolders when I have web.config in the root directory. Any thoughts?
Authentication type can only be set at the root of the application. If you're just modifying the permissions with <authorization>, that's OK, but you can't switch from forms to Windows authentication, for example. If you're going to create a separate virtual app for the admin (which I highly recommend), don't make it a child folder of the main app at all.

Dig Deeper on Win Development Resources

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.