RE: Sharing Authentication cookies between 1.0 and 1.1
From: Tian Min Huang (timhuang_at_online.microsoft.com)
Date: 07/25/03
- Next message: Robert Remen: "Running ASP.NET application from network share"
- Previous message: Peter Moberg: "Role empty in WindowsPrincipal"
- In reply to: Mike LeBlanc: "Sharing Authentication cookies between 1.0 and 1.1"
- Next in thread: Mike LeBlanc: "RE: Sharing Authentication cookies between 1.0 and 1.1"
- Reply: Mike LeBlanc: "RE: Sharing Authentication cookies between 1.0 and 1.1"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Fri, 25 Jul 2003 07:09:14 GMT
Hi Mike,
In order to share the authentication cookie across your applications the
cookie path should be "/" (this is the default value if you don/t specify
it in the web.config files). The cookie name should also be the same in all
the applications. For instance, in the following example, I have 2
applications configured for Forms Authentication. Each of them has a
web.config file pointing to the "/LoginApp" application, where the user
will log in.
-LoginApp
-app1
-app2
The "/LoginApp" application contains the login.aspx page (see attached)
and the following web.config:
<< File: login.aspx >>
<configuration><system.web>
<authentication mode="Forms" >
<forms name="MyAuthCookie" >
<credentials passwordFormat = "Clear">
<user name="foo" password="bar" />
</credentials>
</forms>
</authentication>
</system.web></configuration>
Each of the applications "/app1" and "/app2" contains the following
web.config:
<configuration><system.web>
<authentication mode="Forms" >
<forms name="MyAuthCookie" loginUrl = "/LoginApp/login.aspx" >
</forms>
</authentication>
<authorization>
<deny users="?" />
</authorization>
</system.web></configuration>
If the user is authenticated after requesting the page
http://server/app1/t.aspx then he can access the second application
(http://server/app2/t.aspx) without having to authenticate himself again.
Hope this helps.
Regards,
HuangTM
Microsoft Online Partner Support
MCSE/MCSD
Get Secure! ¨C www.microsoft.com/security
This posting is provided Ħ°as isĦħ with no warranties and confers no rights.
- Next message: Robert Remen: "Running ASP.NET application from network share"
- Previous message: Peter Moberg: "Role empty in WindowsPrincipal"
- In reply to: Mike LeBlanc: "Sharing Authentication cookies between 1.0 and 1.1"
- Next in thread: Mike LeBlanc: "RE: Sharing Authentication cookies between 1.0 and 1.1"
- Reply: Mike LeBlanc: "RE: Sharing Authentication cookies between 1.0 and 1.1"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|