Ask the Expert

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 first published in October 2004

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
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
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: