Q

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

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.

0 comments

Oldest 

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:

SearchCloudComputing

SearchSoftwareQuality

SearchSOA

TheServerSide

SearchCloudApplications

Close