473,383 Members | 1,829 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 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 1616
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Murphy | last post by:
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...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.