Cookie Expires In 2.0 Framework

G

Guest

Hello,

I have a problem, I have been using Cookie Authentication on the 1.1
framework for around 3 months, when I moved the site internally within my
hosting company from a server with 1.1 framework to a server with 2.0
framework I have had cookie expiring problems.

Since moving to the 2.0 server, the cookies now expire within 24 hours at
the most. I have checked that the cookie has a expiry date in the future,
which it does (6 years in the future). However it still breaks.

The server is 2003 with IIS 6. I have spoken to their server admins in
length and they believe the servers are setup pretty much the same.

Any advice would be gratefully received.

Regards Adam
 
N

Nicholas Paldino [.NET/C# MVP]

Adam,

Have you used a tracer/interceptor on the client to see what is being
returned from the server? I would look there first, to see if anything is
being returned differently. If not, it might not be the cookies themselves,
but rather, the code that is processing them that was changed on the move
from 1.1 to 2.0.

Hope this helps.
 
G

Guest

Adam,
For Forms Authentication, cookie settings have been changed in asp.net 2.0,
and now persistent cookies take their lifetime from the timeout value in the
<forms> node in the web.config.
That's probably why the change in expiration.
Peter
 
G

Guest

Many thanks for the replies. I have used an application to test the cookie.
The cookie has an expiry date which is in the future. So I can guessing the
cookie is being created correctly.

In the web.config I have the following
<forms name="tamworthfcfans" timeout="50000000" slidingExpiration="true" />

Thanks again

Adam
 
G

Guest

Many thanks for your response. I tried the solution with teh following error.
Any other suggestions?

Parser Error Message: Unrecognized attribute 'cookiePath'. Note that
attribute names are case-sensitive

Line 31: <authentication mode="Forms">
Line 32: <forms name="tamworthfcfans" cookiePath="/" timeout="50000000"
slidingExpiration="true" />
Line 33: </authentication>
 
G

Guest

Many thanks for your suggestion. After testing, I can saddly confirm that it
doesn't work :-(

Any other suggestions?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top