[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Ram

9/5/2006 9:38:00 AM

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 ?
3 Answers

Scott M.

9/5/2006 2:15:00 PM

0

Work with GMT, rather than local times?


"Ram" <Ram@discussions.microsoft.com> wrote in message
news:165CAD0C-5668-4422-A1C7-29482AD1C1CA@microsoft.com...
> 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 ?


Ram

9/6/2006 4:24:00 AM

0

hi

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

Ram



"Scott M." wrote:

> Work with GMT, rather than local times?
>
>
> "Ram" <Ram@discussions.microsoft.com> wrote in message
> news:165CAD0C-5668-4422-A1C7-29482AD1C1CA@microsoft.com...
> > 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.

9/6/2006 3:05:00 PM

0

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?


"Ram" <Ram@discussions.microsoft.com> wrote in message
news:AD89F86D-7FE7-4C7D-A9B0-CD9228463D1E@microsoft.com...
> hi
>
> i can't change my client local time, could you please more elobrate on
> your
> reply.
>
> Ram
>
>
>
> "Scott M." wrote:
>
>> Work with GMT, rather than local times?
>>
>>
>> "Ram" <Ram@discussions.microsoft.com> wrote in message
>> news:165CAD0C-5668-4422-A1C7-29482AD1C1CA@microsoft.com...
>> > 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 ?
>>
>>
>>