471,594 Members | 1,817 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,594 software developers and data experts.

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

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
2 5172
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
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.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.