Our website contains subdirectories for each subsidiary company, each
company has it's own look and feel to the pages in their subdirectory
although they are all part of the main website.
The code below in the Web.Config file defines the authentication as forms
and the aspx file required for login if the user is unauthenticated... this
works well for the root level company web pages however when a user viewing
the website of SubCompanyA tries to access a secured page such as the
PasswordChange.aspx page as listed below they are always redirected back to
the login.aspx page at the root level. Instead I would like
SubCompanyA/PasswordChange.aspx to redirect the user to
SubCompanyA/login.aspx etc
Is this possible and how can I implement it ?
Thanks
Murphy
<authentication mode="Forms">
<forms name="CompanyWeb" loginUrl="login.aspx" protection="All" path="/"
/>
</authentication>
<location path="PasswordChange.aspx">
<system.web>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</location>
<location path="SubCompanyA/PasswordChange.aspx">
<system.web>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</location>
<location path="SubCompanyB/PasswordChange.aspx">
<system.web>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</location>