Forms Authentication with IIS Virtual Directories

J

Jerry Morton

Hi,
Is it possible to use ASP.NET Forms Authentication in an IIS "Virtual
Directory"? As long as I don't setup the vdir as an application, it
should behave like a regular sub-folder, right?

My ASP.NET application has a regular subfolder which authenticates OK,
but when I replace it with a vdir, authentication doesn't work. I get
strange behaviour where IIS tries to return a "default" page for the
folder and actually truncates the URL, i.e.

http://www.mysite.com/secure/somepage.aspx

turns into

http://www.mysite.com/secure

and IIS returns the "Directory Browsing is not allowed"!

Has anyone had this problem before?

Thanks.
 
M

Mohamed El Ashmawy

Hello,
It's normal to have forms authentication with IIS virtual directories.
There shouldn't be any problems in that.
Are you sure that it 's IIS that authenticates the URL and not that the
requested url isn't sent as http://www.mysite.com/secure

In any case, if you have a default page for that virtual directory, you
should set it in IIS as the default document. This should solve the problem
you are having with truncating the URL.

Regards
Mohamed El Ashmawy
MEA Developer Support Center
ITWorx on behalf of Microsoft EMEA GTSC
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top