Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Caching / September 2006

Tip: Looking for answers? Try searching our database.

cookie expiration

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ram - 05 Sep 2006 10:38 GMT
Hi

I am using cookie to store unique encrypted token, i want to use the cookie
expire time 8 hours.

I doing like below to expire:
Cookie.Expres = DateTime.Now.AddHours(8)

Its working in my local system as both are in same time zones. I got the
problem when I deployed my application to Server, unfortunatley this server
is in GMT time zone and my client is in GMT+5:30 time zone, So when i login
to my ASP.NET application cookie expiration is taking I hour + some minutes
more to expire. I can even see this in my cookie file expires attribute in my
local machine.

How to set cookie expire property when server and client are in diffrent
timezones.

Could anybody help me as it is become critical ?
Scott M. - 05 Sep 2006 15:14 GMT
Work with GMT, rather than local times?

> Hi
>
[quoted text clipped - 20 lines]
>
> Could anybody help me as it is become critical ?
Ram - 06 Sep 2006 05:24 GMT
hi

i can't change my  client local time, could you please more elobrate on your
reply.

Ram



> Work with GMT, rather than local times?
>
[quoted text clipped - 22 lines]
> >
> > Could anybody help me as it is become critical ?
Scott M. - 06 Sep 2006 16:04 GMT
Cookies can be set by the client and/or the server.  Since this is an
ASP.NET newsgroup, I assume you are doing server-side setting of the
cookies.  Why can't you have the server obtain the time zone of the client
(perhaps through the servervariables collection) and adjust the expiration
date/time of the cookie accordingly?

> hi
>
[quoted text clipped - 33 lines]
>> >
>> > Could anybody help me as it is become critical ?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.