By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,548 Members | 1,735 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,548 IT Pros & Developers. It's quick & easy.

<forms name="CompanyWeb" loginUrl="login.aspx" protection="All" path="/" />

P: n/a
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>

Nov 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Could you, in the main login page, examine the GetRedirecUrl, and based on
that (i.e. if the URL is in SubCompanyA or SubCompanyB) redirect to the
appropriate login page. You'd have to preserve the query string with the
RedirectURL value, but I guess the FormsAuthentication methods would still
work. (However, I've never tried it.)

Pete Beech

"Murphy" <mu****@murphy.com> wrote in message
news:Og**************@TK2MSFTNGP11.phx.gbl...
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>

Nov 18 '05 #2

P: n/a
hi

i think you can put another web.config in your subcompany's dictionary
"Murphy" <mu****@murphy.com> 写入消息新闻
:Og**************@TK2MSFTNGP11.phx.gbl...
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>

Nov 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.