Forms Authentication and Cookie Values
From: Eric (eremington@datapex.com)
Date: 06/19/02
From: "Eric" <eremington@datapex.com>
Date: Tue, 18 Jun 2002 18:33:29 -0700
I am trying to set a cookie on login, but the value never
seems to get set. After I validate user from XML file I
am trying to do the following:
HttpCookie MyCookie = new HttpCookie("LastVisit");
DateTime now = DateTime.Now;
FormsAuthentication.SetAuthCookie(UserEmail.Value, true );
MyCookie.Value = now.ToString();
MyCookie.Expires = now.AddHours(1);
Response.Cookies.Add(MyCookie);
Response.Redirect( Request["ReturnURL"] );
Once I return back to the page that forced the login. The
Response.Cookies.Get("LastVisit").Value
is null and not existant in the persistant cookie file?
Can someone tell me how I would set additionatial cookie
values on successful login. I would like to set some
additional values based on the XML user file.
Thanks,
Relevant Pages
- Re: Cookies Expiring due to different time zones.
... post to your aspx login, sending the cookie's date in a hidden field ... set the aspx login cookie using the date/time in the hidden field ... This is the code I am using to create the ticket, ... Your problem is that you're using an extremely short time for the cookie expiration. ... (microsoft.public.dotnet.framework.aspnet) - Re: Accessing and displaying SSL web pages and cookies from a windows form
... or LoadXML calls to urls on the website in order to get data or post data to ... first redirected to a SSL login page, if a particular cookie is not present, ... cookie is not present instead of getting the data. ... >> the data in the cookie and also not redirect to the login page. ... (microsoft.public.dotnet.languages.vb) - Re: [PHP] Need secure login
... Thanks Justin, actually I was also thinking of the same, but just wanted to ... > c) the user not deleting the cookie ... > Likewise, you can't tie a member to a mac address, or to an IP address. ... Make sure that a user can't login from two different places at ... (php.general) - Referencing variable in calling class?
... I assume because the cookie destruction is being sent down in that page ... when that page renders it still appears as if the user is logged ... So, I thought perhaps as part of my logout routine, I could set a variable ... whether or not it displays the 'login' url or the 'logout' url. ... (php.general) - Re: How to share session with IE
... my browser module if necessary. ... program can load the cookies from your real browser's cookie store ... "need to login" condition, and react accordingly. ... Another option instead of making your program run through a series of clicks and text inputs, which is difficult to program, is to browse the html source until you find the name of the script that processes the login, and use python to request the page with the necessary form fields encoded in the request. ... (comp.lang.python) |
|