Multiple formsauthentifications in the same application

Posted by citronas on Stack Overflow See other posts from Stack Overflow or by citronas
Published on 2009-12-30T21:51:09Z Indexed on 2010/05/15 23:10 UTC
Read the original article Hit count: 247

Hi there, I was wondering if it is possible to use two different formsauthentification logins with the following directory structure:

/default.aspx
/login.aspx
/web.config
/subdirectory/sublogin.aspx
/subdirectory/subdefault.aspx
/subdirectory/web.config

The web.config in the root contains the following settings:

<authentication mode="Forms">
  <forms  protection="All" slidingExpiration="true" loginUrl="~/login.aspx" path="/"/>
</authentication>
<authorization>
  <deny users="?"/>
</authorization>

What I want to achieve is, that all directories except 'subdirectory' are protected by the login.aspx in the root. 'subdirectory' has its own login.aspx (sublogin.aspx)

How would the correct content of the web.config in subdirectory look like?

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about login