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.

This was last published in October 2004

Dig Deeper on Win Development Resources

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.