473,382 Members | 1,424 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Cookie Expires In 2.0 Framework

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

Jun 1 '06 #1
7 2023
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.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Adam Bates" <Adam Ba***@discussions.microsoft.com> wrote in message
news:45**********************************@microsof t.com...
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

Jun 1 '06 #2
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

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Adam Bates" wrote:
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

Jun 1 '06 #3
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

"Peter Bromberg [C# MVP]" wrote:
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

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Adam Bates" wrote:
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

Jun 1 '06 #4
Isn't there a cookiePath attribute? Try putting that in, set to = "/".
Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Adam Bates" wrote:
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

"Peter Bromberg [C# MVP]" wrote:
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

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Adam Bates" wrote:
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

Jun 1 '06 #5
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>

"Peter Bromberg [C# MVP]" wrote:
Isn't there a cookiePath attribute? Try putting that in, set to = "/".
Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Adam Bates" wrote:
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

"Peter Bromberg [C# MVP]" wrote:
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

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Adam Bates" wrote:

> 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
>

Jun 3 '06 #6
Turns out that it is "path", not "cookiePath". All in the documentation if
you care to read it:

http://msdn2.microsoft.com/en-us/library/1d3t3c61.aspx
Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Adam Bates" wrote:
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>

"Peter Bromberg [C# MVP]" wrote:
Isn't there a cookiePath attribute? Try putting that in, set to = "/".
Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Adam Bates" wrote:
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

"Peter Bromberg [C# MVP]" wrote:

> 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
>
> --
> Co-founder, Eggheadcafe.com developer portal:
> http://www.eggheadcafe.com
> UnBlog:
> http://petesbloggerama.blogspot.com
>
>
>
>
> "Adam Bates" wrote:
>
> > 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
> >

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

Any other suggestions?

"Peter Bromberg [C# MVP]" wrote:
Turns out that it is "path", not "cookiePath". All in the documentation if
you care to read it:

http://msdn2.microsoft.com/en-us/library/1d3t3c61.aspx
Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Adam Bates" wrote:
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>

"Peter Bromberg [C# MVP]" wrote:
Isn't there a cookiePath attribute? Try putting that in, set to = "/".
Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Adam Bates" wrote:

> 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
>
> "Peter Bromberg [C# MVP]" wrote:
>
> > 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
> >
> > --
> > Co-founder, Eggheadcafe.com developer portal:
> > http://www.eggheadcafe.com
> > UnBlog:
> > http://petesbloggerama.blogspot.com
> >
> >
> >
> >
> > "Adam Bates" wrote:
> >
> > > 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
> > >

Jun 6 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: AHN | last post by:
Please tell me somebody what causes the cookie set with <% Response.Cookies("blah") = "Blah blah" Response.Cookies("blah").Expires = DateAdd( "h", 1, Now() ) %> work as supposed on my local...
4
by: Shannon Jacobs | last post by:
I'm doing some trivial surveys, and I want to know if the same user answers twice. Can't really know that, but at least I thought I could check for the same browser/computer combination by using a...
12
by: chrism | last post by:
Hello, I have a pop-up window that I would like to appear in front of the browser home page when a user opens IE. Problem is, I'd like it to never appear again if the user navigates back to the...
5
by: brettr | last post by:
When I reference document.cookie, there is a long string of key=value; pairs listed. I may have 100 hundred cookies on my hard drive. However, most only have one key=value pair. Does the...
1
by: Mike | last post by:
Hello, I can't find any javascript that reads and writes cookies with keys, so that it is compatible with ASP (I want to read and write cookies from both javascript and ASP) for example in...
6
by: Jason Collins | last post by:
There seems to be an inconsistency (bug?) in the way the Set-Cookie header is handled by the WebHeaderCollection. That is, the values of Set-Cookie, when an Expires is specified, contain the ","...
15
by: Oleg Leikin | last post by:
Hi, (newbie question) I've created some simple .NET ASP application that should store cookies at the client machine. According to the documentation cookie expiration time is set via...
1
by: Henri | last post by:
Hi, My page saves user's login on user's computer using a cookie: Dim expires As Date = DateTime.Now.AddMonths(1) Dim cookie As New HttpCookie("login", loginValue) cookie.Expires = expires...
1
by: CR1 | last post by:
I found a great cookie script below, but don't know how to make it also pass the values sent to the cookie, to a querystring as well for tracking purposes. Can anyone help? If there was a way to...
0
by: JT | last post by:
I posted a question earlier about communicating between a javascript function and vb.net. In the end I decided to try using a cookie. I use the following javascript function (from vb.net) to set...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.