473,721 Members | 3,486 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 3903
> 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
7120
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 user accesses it (not just once and then store it in the session). If a secure app is multi-page,...
3
3538
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
4028
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
1255
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
1359
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 sess var in a query to get the UserID in the database This is successful because I have the user id...
13
2852
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 not.... what is this effect?
4
3132
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 cup of tea, and return, done a re-run and it has remembered the session data). I have noted that...
11
13187
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 the same server. I use Apache 2.2.3 (Win32) with PHP 5.2.0.
5
4120
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
8851
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8736
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9227
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9077
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6676
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5992
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4497
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4761
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3202
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.