Forms Authentication problem

  • Thread starter Thread starter Andy M
  • Start date Start date
A

Andy M

Hi,

I am developing an ASP.NET application that uses forms authentication.
However, it contains subdirectories, and they don't get authenticated
somehow. I added a web.config and set the SignOn.aspx to the sign on
page in the application's root directory. However, if I move to a page
in one of the subdirectories it requires me to log in again. Once I log
in successfully it keeps sending me back to my sign in page.

Does anyone have any idea what I am doing wrong?

Cheers,
Andy
 
Girish said:
That's a very interesting article and has increased my understanding of
authorisation a little bit, however it is still asking a user to log-in
again when they move to a page in the subdirectory. In my application
the user signs in on the application root directory, I do not want them
to have to sign in again when moving to a sub-directory.

Cheers,
Andy
 
Well, I was thinking that
<location path="sub-directory">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>

Can you use this + any other settings that you need per subdirectory and
remove the virtual directories for those sub directories?
 
Girish said:
Well, I was thinking that
<location path="sub-directory">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>

Can you use this + any other settings that you need per subdirectory and
remove the virtual directories for those sub directories?

Thanks, that is what I did. However I just discovered the reason - The
subdirectory was also a virtual directory (so IIS was treating it as a
separate application root, I think)

Many thanks for your help. The article was most useful.

Cheers,
Andy
 
Back
Top