Re: Getting forms auth challenge
From: MarkMurphy (murphy_at_murphysw.com)
Date: 07/29/04
- Next message: dave: "Cannot find Network Service account in iis6"
- Previous message: masoud bayan: "adding cookie"
- In reply to: Jim Cheshire [MSFT]: "RE: Getting forms auth challenge"
- Next in thread: Jim Cheshire [MSFT]: "Re: Getting forms auth challenge"
- Reply: Jim Cheshire [MSFT]: "Re: Getting forms auth challenge"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: 29 Jul 2004 09:58:15 -0700
Thanks Jim,
I think you meant:
<deny users="?" />
<allow users="*" />
However it's still not redirecting unauthenticated users to
login.aspx. Also it appears that no cookie is being written on a
successful login, though I've verified that this code executes:
//Create an authentication ticket to store in a cookie
FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(
1, //Version - change to invalidate cookies
u.UserName,
DateTime.Now, //Authentication time
DateTime.Now.AddMinutes(SessionTimeout), //Time stay authenticated
false, //No persistent cookie
""); //User data
string encryptedTicket = FormsAuthentication.Encrypt(ticket);
Response.Cookies.Add(new
HttpCookie(FormsAuthentication.FormsCookieName, encryptedTicket));
string redirectUrl = FormsAuthentication.GetRedirectUrl(u.UserName,
false);
FormsAuthentication.SetAuthCookie(u.UserName, false);
-Mark
- Next message: dave: "Cannot find Network Service account in iis6"
- Previous message: masoud bayan: "adding cookie"
- In reply to: Jim Cheshire [MSFT]: "RE: Getting forms auth challenge"
- Next in thread: Jim Cheshire [MSFT]: "Re: Getting forms auth challenge"
- Reply: Jim Cheshire [MSFT]: "Re: Getting forms auth challenge"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|