Search:
Namespaces
Discussions
.NET v1.1
Feedback
SV: Web.Config & multiple login forms
Messages
Related Types
This message was discovered on
ASPFriends.com 'aspngconfig' list
.
=?iso-8859-1?Q?Andr=E9_Colbi=F6rnsen?=
I don't think what you are trying to achieve is possible. To set up
different logins for different folders, you will have to make that
folder it's own virtual directory, sorting under your web or as a sub
virtual directory to your rootapplication.
Regards/Halsningar
Andre Colbiornsen
--------------------------------------
Sonnenburg Communications
Bergsgatan 3,
SE-211 54 Malm=F6
Sweden
Tel.: +46-(0)40-97 78 80
Fax.: +46-(0)40-97 78 80
Mob.: +46-(0)708-97 78 79
Mail:
Click here to reveal e-mail address
Web.: www.sonnenburg.se
--------------------------------------
B2B Web agency - Specializing on .Net
--------------------------------------
-----Ursprungligt meddelande-----
Fr=E5n: Jason Hick [mailto:
Click here to reveal e-mail address
]=20
Skickat: den 31 maj 2002 16:10
Till: aspngconfig
=C4mne: [aspngconfig] Web.Config & multiple login forms
-- Moved from [aspngfreeforall] to [aspngconfig] by James Avery
<
Click here to reveal e-mail address
> --
Hi,
Does anyone know if it's possible to setup different login forms for
multiple directories in the web.config file?
I've tried this below but it doesn't work! For the moment I've had to
set the 2nd folder as a new application on a test server, but I won't
have access to so this with my ISP.
Here's the code I've used so far:
<authentication mode=3D"Forms">
<forms name=3D"loginProfile" loginUrl=3D"/loginProfile.aspx"
protection=3D"All" path=3D"/profile/" />
<forms name=3D"loginAdmin" loginUrl=3D"/loginAdmin.aspx"
protection=3D"All" path=3D"/admin/" /> </authentication> <authorization>
<allow users=3D"?" />
</authorization>
Regards,
Jason
| [aspngconfig] member
Click here to reveal e-mail address
=3D YOUR ID=20
|
http://www.asplists.com/asplists/aspngconfig.asp
=3D JOIN/QUIT=20
|
http://www.asplists.com/search
=3D SEARCH Archives
Reply to this message...
John Hamman {Hamman Interactive}
I just asked this not long ago, the closses anwser i got to a solution was
that you do a select case setup in your login.aspx page that reads where the
page is being called from and shows differnt logins.
john
-----Original Message-----
From: André Colbiörnsen [mailto:
Click here to reveal e-mail address
]
Sent: Friday, May 31, 2002 12:38 PM
To: aspngconfig
Subject: [aspngconfig] SV: Web.Config & multiple login forms
I don't think what you are trying to achieve is possible. To set up
different logins for different folders, you will have to make that
folder it's own virtual directory, sorting under your web or as a sub
virtual directory to your rootapplication.
Regards/Halsningar
Andre Colbiornsen
--------------------------------------
Sonnenburg Communications
Bergsgatan 3,
SE-211 54 Malmö
Sweden
Tel.: +46-(0)40-97 78 80
Fax.: +46-(0)40-97 78 80
Mob.: +46-(0)708-97 78 79
Mail:
Click here to reveal e-mail address
Web.: www.sonnenburg.se
--------------------------------------
B2B Web agency - Specializing on .Net
--------------------------------------
-----Ursprungligt meddelande-----
Från: Jason Hick [mailto:
Click here to reveal e-mail address
]
Skickat: den 31 maj 2002 16:10
Till: aspngconfig
Ämne: [aspngconfig] Web.Config & multiple login forms
-- Moved from [aspngfreeforall] to [aspngconfig] by James Avery
<
Click here to reveal e-mail address
> --
Hi,
Does anyone know if it's possible to setup different login forms for
multiple directories in the web.config file?
I've tried this below but it doesn't work! For the moment I've had to
set the 2nd folder as a new application on a test server, but I won't
have access to so this with my ISP.
Here's the code I've used so far:
<authentication mode="Forms">
<forms name="loginProfile" loginUrl="/loginProfile.aspx"
protection="All" path="/profile/" />
<forms name="loginAdmin" loginUrl="/loginAdmin.aspx"
protection="All" path="/admin/" /> </authentication> <authorization>
<allow users="?" />
</authorization>
Regards,
Jason
| [aspngconfig] member
Click here to reveal e-mail address
= YOUR ID
|
http://www.asplists.com/asplists/aspngconfig.asp
= JOIN/QUIT
|
http://www.asplists.com/search
= SEARCH Archives
| [aspngconfig] member
Click here to reveal e-mail address
= YOUR ID
|
http://www.asplists.com/asplists/aspngconfig.asp
= JOIN/QUIT
|
http://www.asplists.com/search
= SEARCH Archives
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (
http://www.grisoft.com
).
Version: 6.0.365 / Virus Database: 202 - Release Date: 5/24/2002
Reply to this message...
Alex Dresko
I must admit, I'd be surprised if .NET doesn't support multiple logins.
In fact, I'll have to rethink part of the project I'm working on if you
are correct about that.=20
Alex Dresko
Three Point Oh!
-----Original Message-----
From: John Hamman {Hamman Interactive} [mailto:
Click here to reveal e-mail address
]=20
Sent: Friday, May 31, 2002 1:04 PM
To: aspngconfig
Subject: [aspngconfig] RE: SV: Web.Config & multiple login forms
I just asked this not long ago, the closses anwser i got to a solution
was
that you do a select case setup in your login.aspx page that reads where
the
page is being called from and shows differnt logins.
john
-----Original Message-----
From: Andr=E9 Colbi=F6rnsen [mailto:
Click here to reveal e-mail address
]
Sent: Friday, May 31, 2002 12:38 PM
To: aspngconfig
Subject: [aspngconfig] SV: Web.Config & multiple login forms
I don't think what you are trying to achieve is possible. To set up
different logins for different folders, you will have to make that
folder it's own virtual directory, sorting under your web or as a sub
virtual directory to your rootapplication.
Regards/Halsningar
Andre Colbiornsen
--------------------------------------
Sonnenburg Communications
Bergsgatan 3,
SE-211 54 Malm=F6
Sweden
Tel.: +46-(0)40-97 78 80
Fax.: +46-(0)40-97 78 80
Mob.: +46-(0)708-97 78 79
Mail:
Click here to reveal e-mail address
Web.: www.sonnenburg.se
--------------------------------------
B2B Web agency - Specializing on .Net
--------------------------------------
-----Ursprungligt meddelande-----
Fr=E5n: Jason Hick [mailto:
Click here to reveal e-mail address
]
Skickat: den 31 maj 2002 16:10
Till: aspngconfig
=C4mne: [aspngconfig] Web.Config & multiple login forms
-- Moved from [aspngfreeforall] to [aspngconfig] by James Avery
<
Click here to reveal e-mail address
> --
Hi,
Does anyone know if it's possible to setup different login forms for
multiple directories in the web.config file?
I've tried this below but it doesn't work! For the moment I've had to
set the 2nd folder as a new application on a test server, but I won't
have access to so this with my ISP.
Here's the code I've used so far:
<authentication mode=3D"Forms">
<forms name=3D"loginProfile" loginUrl=3D"/loginProfile.aspx"
protection=3D"All" path=3D"/profile/" />
<forms name=3D"loginAdmin" loginUrl=3D"/loginAdmin.aspx"
protection=3D"All" path=3D"/admin/" /> </authentication> <authorization>
<allow users=3D"?" />
</authorization>
Regards,
Jason
| [aspngconfig] member
Click here to reveal e-mail address
=3D YOUR ID
|
http://www.asplists.com/asplists/aspngconfig.asp
=3D JOIN/QUIT
|
http://www.asplists.com/search
=3D SEARCH Archives
| [aspngconfig] member
Click here to reveal e-mail address
=3D YOUR ID
|
http://www.asplists.com/asplists/aspngconfig.asp
=3D JOIN/QUIT
|
http://www.asplists.com/search
=3D SEARCH Archives
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (
http://www.grisoft.com
).
Version: 6.0.365 / Virus Database: 202 - Release Date: 5/24/2002
| [aspngconfig] member
Click here to reveal e-mail address
=3D YOUR ID
|
http://www.asplists.com/asplists/aspngconfig.asp
=3D JOIN/QUIT
|
http://www.asplists.com/search
=3D SEARCH Archives
Reply to this message...
Beren Longstreet
To quote SAM'S 'Programming Data-Driven Web Applications With ASP.NET' by Donny Mack & Doug Seven:
Chapter 15, Authentication, p.507:
'Specific resources such as .aspx files or subdirectories can be defined to use different authorization rules. This can be done in two ways, by using the <location> element in the web.config file, or by putting a web.config file in the subdirectory. Configuration files below the root directory cannot redefine the authentication scheme, but they can redefine the authentication rules for the directoru that they are in and for all child directories. Listing 15.4 shows a <location> element that can be added to the web.config file to restrict access to a resource to authenticated users only.
Listing 15.4 Restricting Access to Specific Resources
----------------------
<location path="protected_page.aspx">
<system.web>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</location>
' End quote.
Hope this helps,
Beren Longstreet, MCP
--
_______________________________________________
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup
Reply to this message...
ritesh darbar
This is possible. But the solution is not a standard way yet its very simple.
Considering your example,
In page_load() function in file loginAdmin.aspx.cs add following lines >>
<pre>
string temp = Request.QueryString["ReturnUrl"].ToUpper();
if(temp.IndexOf("PROFILE/") != -1)
Response.Redirect("LoginProfile.aspx?ReturnUrl=" + temp, true);
</pre>
This should work. I faced similar problem in one of my application.
If you still face the problem please feel free to contact.
Regards,
Ritesh
Reply to this message...
Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us
-
Terms of Use
-
Privacy Policy
-
www.dotnet247.com