473,545 Members | 2,027 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Session cookies disappear!

Hi All,

I recently discovered that my session cookies on the web host disappear
within 30 seconds.
I created some very simple asp scripts (it took me a while until I
discovered why my shopping cart acts very weird...) to check the session
cookies.

On one asp page I set up cookies:

setcookie.asp
<%
Session("Transa ctionID") = 15
Session("Custom erID") = 1
%>

and on

readcookie.asp
<%
response.write "Session(""Tran sactionID"")=" & Session("Transa ctionID") &
"<br>"
response.write "Session(""Cust omerID"")=" & Session("Custom erID") & "<br>"
%>

The same asp pages run on my XP Pro show that the session cookies don't
expire as long as I close the browser, while on the remote web server, if I
do a refresh on readcookie.asp after 30 seconds, they are gone.

I run ASP on the server and all I know is that it is a Plesk server. No idea
if it actually a Linux server or a Windows one...
Do I have to setup expiry time or something for session cookies?
Any information appreciated.

Regards,
Nicolae
Jul 22 '05 #1
6 3889
> The same asp pages run on my XP Pro show that the session cookies don't
expire as long as I close the browser, while on the remote web server, if I
do a refresh on readcookie.asp after 30 seconds, they are gone.
http://www.aspfaq.com/2157
I run ASP on the server and all I know is that it is a Plesk server. No idea
if it actually a Linux server or a Windows one...


Well, that's a big difference. You're going to need to find out if it is
Windows, and if not, what kind of ASP emulator is running. It could be a
setting in the web server (e.g. they could have disabled session state), but
for anything on the server, if you don't have direct access to it, you're
going to have to talk to the technical people there anyway.

A

Jul 22 '05 #2

"Aaron [SQL Server MVP]" <te*****@dnartr eb.noraa> wrote in message
news:BE5E6786.3 8E7%te*****@dna rtreb.noraa...
The same asp pages run on my XP Pro show that the session cookies don't
expire as long as I close the browser, while on the remote web server, if
I
do a refresh on readcookie.asp after 30 seconds, they are gone.


http://www.aspfaq.com/2157
I run ASP on the server and all I know is that it is a Plesk server. No
idea
if it actually a Linux server or a Windows one...


Well, that's a big difference. You're going to need to find out if it is
Windows, and if not, what kind of ASP emulator is running. It could be a
setting in the web server (e.g. they could have disabled session state),
but
for anything on the server, if you don't have direct access to it, you're
going to have to talk to the technical people there anyway.


Thank you very much, Aaron. I read the FAQ and I think it is a problem on
the web server. Apparently they have a Windows server.
I contacted them, waiting for their reply.

Regards,
Nicolae
Jul 22 '05 #3
"Nicolae Fieraru" <no****@please. com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..

"Aaron [SQL Server MVP]" <te*****@dnartr eb.noraa> wrote in message
news:BE5E6786.3 8E7%te*****@dna rtreb.noraa...
The same asp pages run on my XP Pro show that the session cookies don't
expire as long as I close the browser, while on the remote web server,
if I
do a refresh on readcookie.asp after 30 seconds, they are gone.


http://www.aspfaq.com/2157
I run ASP on the server and all I know is that it is a Plesk server. No
idea
if it actually a Linux server or a Windows one...


Well, that's a big difference. You're going to need to find out if it is
Windows, and if not, what kind of ASP emulator is running. It could be a
setting in the web server (e.g. they could have disabled session state),
but
for anything on the server, if you don't have direct access to it, you're
going to have to talk to the technical people there anyway.


Thank you very much, Aaron. I read the FAQ and I think it is a problem on
the web server. Apparently they have a Windows server.
I contacted them, waiting for their reply.

Regards,
Nicolae


Try this:

Response.write Session.Timeout

What do you get?

--
--Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
Jul 22 '05 #4
If this is a random occurrance, you're not alone.

I think I have found the solution though. If the server is a Windows
server, which I suspect it is, the name of the server must not contain any
_.

Micorsoft IIS6 randomly drops sessions by design if an underscore _ is
contained in the server name, some sort of security flaw or something. To
fix the problem make sure the machine name does not have an _ and make sure
the workgroup it belongs to does not have an _.

I recently experienced this problem on a new server I am renting and changed
the workgroup as stated above and it seems to be stable.

Try it and see

"Nicolae Fieraru" <no****@please. com> wrote in message
news:42******** @duster.adelaid e.on.net...
Hi All,

I recently discovered that my session cookies on the web host disappear
within 30 seconds.
I created some very simple asp scripts (it took me a while until I
discovered why my shopping cart acts very weird...) to check the session
cookies.

On one asp page I set up cookies:

setcookie.asp
<%
Session("Transa ctionID") = 15
Session("Custom erID") = 1
%>

and on

readcookie.asp
<%
response.write "Session(""Tran sactionID"")=" & Session("Transa ctionID") &
"<br>"
response.write "Session(""Cust omerID"")=" & Session("Custom erID") & "<br>"
%>

The same asp pages run on my XP Pro show that the session cookies don't
expire as long as I close the browser, while on the remote web server, if
I do a refresh on readcookie.asp after 30 seconds, they are gone.

I run ASP on the server and all I know is that it is a Plesk server. No
idea if it actually a Linux server or a Windows one...
Do I have to setup expiry time or something for session cookies?
Any information appreciated.

Regards,
Nicolae

Jul 22 '05 #5
If this is a random occurrance, you're not alone.

I think I have found the solution though. If the server is a Windows
server, which I suspect it is, the name of the server must not contain any
_.

Micorsoft IIS6 randomly drops sessions by design if an underscore _ is
contained in the server name, some sort of security flaw or something. To
fix the problem make sure the machine name does not have an _ and make sure
the workgroup it belongs to does not have an _.

I recently experienced this problem on a new server I am renting and changed
the workgroup as stated above and it seems to be stable.

Try it and see

"Nicolae Fieraru" <no****@please. com> wrote in message
news:42******** @duster.adelaid e.on.net...
Hi All,

I recently discovered that my session cookies on the web host disappear
within 30 seconds.
I created some very simple asp scripts (it took me a while until I
discovered why my shopping cart acts very weird...) to check the session
cookies.

On one asp page I set up cookies:

setcookie.asp
<%
Session("Transa ctionID") = 15
Session("Custom erID") = 1
%>

and on

readcookie.asp
<%
response.write "Session(""Tran sactionID"")=" & Session("Transa ctionID") &
"<br>"
response.write "Session(""Cust omerID"")=" & Session("Custom erID") & "<br>"
%>

The same asp pages run on my XP Pro show that the session cookies don't
expire as long as I close the browser, while on the remote web server, if
I do a refresh on readcookie.asp after 30 seconds, they are gone.

I run ASP on the server and all I know is that it is a Plesk server. No
idea if it actually a Linux server or a Windows one...
Do I have to setup expiry time or something for session cookies?
Any information appreciated.

Regards,
Nicolae

Jul 22 '05 #6
It is not IIS it is IE that is dropping cookies and it is by design.

http://support.microsoft.com/default...b;en-us;316112

--
--Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"Adam Short" <ad**@phuture-uk.net> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
If this is a random occurrance, you're not alone.

I think I have found the solution though. If the server is a Windows
server, which I suspect it is, the name of the server must not contain any
_.

Micorsoft IIS6 randomly drops sessions by design if an underscore _ is
contained in the server name, some sort of security flaw or something. To
fix the problem make sure the machine name does not have an _ and make
sure
the workgroup it belongs to does not have an _.

I recently experienced this problem on a new server I am renting and
changed
the workgroup as stated above and it seems to be stable.

Try it and see

"Nicolae Fieraru" <no****@please. com> wrote in message
news:42******** @duster.adelaid e.on.net...
Hi All,

I recently discovered that my session cookies on the web host disappear
within 30 seconds.
I created some very simple asp scripts (it took me a while until I
discovered why my shopping cart acts very weird...) to check the session
cookies.

On one asp page I set up cookies:

setcookie.asp
<%
Session("Transa ctionID") = 15
Session("Custom erID") = 1
%>

and on

readcookie.asp
<%
response.write "Session(""Tran sactionID"")=" & Session("Transa ctionID") &
"<br>"
response.write "Session(""Cust omerID"")=" & Session("Custom erID") &
"<br>"
%>

The same asp pages run on my XP Pro show that the session cookies don't
expire as long as I close the browser, while on the remote web server, if
I do a refresh on readcookie.asp after 30 seconds, they are gone.

I run ASP on the server and all I know is that it is a Plesk server. No
idea if it actually a Linux server or a Windows one...
Do I have to setup expiry time or something for session cookies?
Any information appreciated.

Regards,
Nicolae


Jul 22 '05 #7

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

Similar topics

27
7091
by: mrbog | last post by:
Tell me if my assertion is wrong here: The only way to prevent session hijacking is to NEVER store authentication information (such as name/password) in the session. Well, to never authenticate a user from information you got from the session. Each secure app on a site must challenge the user for name and password, each and every time the...
3
3535
by: PM | last post by:
I'm trying to make a kind of search history containing the 3 last searched words. So I'm using 3 Session Variables: Word1 / Word2 / Word3. In order to get this history working, I need to put the last searched word in the following Variable. Ex.: Session("Word3") = Session("Word2") Session("Word2") = Session("Word1")
5
4014
by: Larry Woods | last post by:
I am losing Session variables, but only those that are set in the page previous to a redirect to a secure page. Anyone seen ANY situation where Session variables just "disappear?" Note that OTHER session variables are still intact !?! TIA, Larry Woods
5
1248
by: BillH | last post by:
My page works fine on IE but nn (7.2 is my test version) seems to drop my session variables. I have the lowest security settings allowing all cookies. Wazzzz up?
1
1350
by: samtran331 | last post by:
Hi all I've got a .Net site that has 3 session variables...the variables should persist over 23 unique insert pages, 23 update, and 23 "view total" pages... And the problem is once I get past one page, the session vars disappear The logic is 1. logon = set a session var to the email addres 2. redirect to a "main page" that uses the email...
13
2799
by: Alexander Widera | last post by:
hi, who has seen the follow problem or could help please? i visit a page .... i read a sesssion-var . ... everythink works...... i visit the page again..... error ... the sessionvar is null .... i visit again .... null ... again .... it works ..... again ... it works ... again ..... null....... and so on and on .... it does randomly work or...
4
3124
by: Eric Porter | last post by:
Problem : I have a Web Server which is session enabled. I have a method within that server which if I call it repeatedly, it seems to forget the session every six re-tries, and all the data therein. Is there, perhaps, a time-out setting somewhere (one of the myriad) that I may have missed (although I have run this sometimes, gone for a...
11
13120
by: Bocah Sableng | last post by:
Hi, I'm new member of this group. I had added new virtual host at my intranet server. The new virtual host configuration on httpd.conf is similar with the old one. At the new virtual host, the session id seems changed every interaction to server (new page or reload). The old one is fine, the session id keeps at the same string. Both are at...
5
4102
by: bgold12 | last post by:
When a user logs onto my site, I set some session data using php: .... session_start(); .... $_SESSION = 'value'; .... From what I understand, this should store the session data (i.e. the key-value pairs) in a cookie on the user's computer, and it should be
0
7475
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7921
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7437
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7771
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5982
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
4958
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3465
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1023
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
720
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.