473,668 Members | 2,290 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Serious Problem - Lost Session Variables

Please help.....!

I have built a site that works/worked absolutely fine on my test server.
When I transferred it to a remote web host (the intended permanent home of
the site) something very worrying keeps happening to my site.

I use, as is the norm, session variables to store login information. At the
top of each page I do a check that Session("isLogg edIn") = "True", and if
not then the system logs them back out.

The serious problem is that once you have logged into the site, the next
page you try to open it fails the above check and logs you out! Obviously
Session("isLogg edIn") is not equal to "True" so it assumes you aren't logged
in. So basically the session variables are getting lost/cleared.

This makes my site unusable, and is a disaster for it unless I can get a
solution.

Any ideas? Any help will be very, very appreciated.
Jul 19 '05 #1
12 15571
> The serious problem is that once you have logged into the site, the next
page you try to open it fails the above check and logs you out! Obviously
Session("isLogg edIn") is not equal to "True" so it assumes you aren't logged in. So basically the session variables are getting lost/cleared.


www.aspfaq.com/2157

(microsoft.publ ic.inetserver.a sp.db removed from x-post list)
Jul 19 '05 #2
joe
welcome to the wonderful world of sessions thanks to IE and various security
features

"frank" <fr*****@franki e.com> wrote in message
news:e6******** ******@TK2MSFTN GP11.phx.gbl...
"Aaron Bertrand - MVP" <aa***@TRASHasp faq.com> wrote in message
news:eV******** ******@TK2MSFTN GP12.phx.gbl...
The serious problem is that once you have logged into the site, the next page you try to open it fails the above check and logs you out! Obviously Session("isLogg edIn") is not equal to "True" so it assumes you aren't logged
in. So basically the session variables are getting lost/cleared.


www.aspfaq.com/2157


That page has a few interesting suggestions, but the weird thing for me is
that I *never* had this problem when it ran on my test server... only my

new remote host (DiscountASP.NE T). It's the same code that has been copied
over - it also works when viewed on some client browsers, but not others.

It's a nightmare.....

Jul 19 '05 #3
> remote host (DiscountASP.NE T). It's the same code that has been copied
over - it also works when viewed on some client browsers, but not others.


I don't think this has anything to do with code, for what it's worth.
Jul 19 '05 #4
"joe" <contact_by_New sgroup_only.ple ase> wrote in message
news:eB******** ******@TK2MSFTN GP12.phx.gbl...
"frank" <fr*****@franki e.com> wrote in message
news:e6******** ******@TK2MSFTN GP11.phx.gbl...
"Aaron Bertrand - MVP" <aa***@TRASHasp faq.com> wrote in message
news:eV******** ******@TK2MSFTN GP12.phx.gbl...
> The serious problem is that once you have logged into the site, the next > page you try to open it fails the above check and logs you out! Obviously
> Session("isLogg edIn") is not equal to "True" so it assumes you aren't logged
> in. So basically the session variables are getting lost/cleared.

www.aspfaq.com/2157


That page has a few interesting suggestions, but the weird thing for me is that I *never* had this problem when it ran on my test server... only my

new
remote host (DiscountASP.NE T). It's the same code that has been copied
over - it also works when viewed on some client browsers, but not others.
It's a nightmare.....

welcome to the wonderful world of sessions thanks to IE and various

security features


Is this a known problem that is sometimes unfixable?
Jul 19 '05 #5
"Aaron Bertrand - MVP" <aa***@TRASHasp faq.com> wrote in message
news:OQ******** ******@TK2MSFTN GP12.phx.gbl...
remote host (DiscountASP.NE T). It's the same code that has been copied
over - it also works when viewed on some client browsers, but not
others.
I don't think this has anything to do with code, for what it's worth.


Any idea why it works fine when running on one test server, but not when
running on one of the most popular ASP hosts?

Should I forget about using session variables? What is the alternative for
security issues such as logging users in?
Jul 19 '05 #6
> Any idea why it works fine when running on one test server, but not when
running on one of the most popular ASP hosts?


Which of the items in that last have you eliminated?
Jul 19 '05 #7
"Aaron Bertrand - MVP" <aa***@TRASHasp faq.com> wrote in message
news:Ol******** ******@TK2MSFTN GP12.phx.gbl...
Any idea why it works fine when running on one test server, but not when
running on one of the most popular ASP hosts?


Which of the items in that last have you eliminated?


I knew it was only affecting some browsers on some machines (very
inconsistent), but the last half-hour has really confused me.

I was composing an email to DiscountASP.NET and when I just started it I
went into my application and the session variable(s) were lost, as expected.
Half-way through the email I went back into the site and it worked fine
(each page opened fine). I've just now went back into the site and it's no
longer working. Exact same webserver, url, code & client browser. I even
logged into the site with the same test user.

With regards the list of problems;

Due to the fact it sometimes works I've eliminated 1, 2, 3 & 4.

I can probably eliminate 5 & 8 as the application works fine on my test
server.

6 & 7 I couldn't guarantee as I'm not hosting the server but I'd imagine a
respected host such as DiscountASP.NET would make sure these things work.
Jul 19 '05 #8
"frank" wrote:

Is this a known problem that is sometimes unfixable?


Yes. If your site requires Internet Explorer, then it may be unfixable. Do
you experience the same problems with Gecko-based browsers?
--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 19 '05 #9
"frank" wrote:

I was composing an email to DiscountASP.NET and when I just started it I
went into my application and the session variable(s) were lost, as expected. Half-way through the email I went back into the site and it worked fine
(each page opened fine). I've just now went back into the site and it's no
longer working. Exact same webserver, url, code & client browser. I even
logged into the site with the same test user.


Any chance DiscountASP.NET uses server farms?
--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 19 '05 #10

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

Similar topics

1
1422
by: Eliyahu Goldin | last post by:
When I run my ASP.NET application first time after deployment, it runs OK. On the second run, when one of my web forms tries to read session variables set in another form, it finds them empty. Nevertheless, if in the same session I set the variables again, they don't get lost anymore. What could be the reason for the session variables to get lost in the beginning of the session? Could it be a size issue? Where can I set amount of storage...
5
1630
by: rich00 | last post by:
i am developing an asp.net web based application using javascript as the server side scripting language. The application makes constant use of an access database and session variables. in a random way, the session variables are lost causing the application to break. The only software on the xp-pro box is iis, .NET framework, office 2003 and 3 com objects: aspmail, aspimage and aspsmartupload. There is no virus detection software. Anybody have...
9
3244
by: AndersBj | last post by:
Hi all, I have a web application that uses State Server for session handling. The web application randomly loses all session variables. The sessions are not always lost, sometimes I can use the application for a day or so, and sometimes the sessions are lost every 5 minutes. I've read some discussions about different things that cause the application to restart and then lose its sessions. But this only occurs when using InProc as...
7
2962
by: Erik | last post by:
I have an application that uses sessions variables a lot but one I publish the application on the prod server these variables are lost. The application is written i c# 2.0 and I've set the statServer timeout to 20 min in the the web.config file. Any ideas why the variables are lost?
4
2864
by: Sarah Marriott | last post by:
Our website contains session variables that are used to validate if a user is logged in etc. We have found that these variables are randomly lost while navigating the website. We set up some basic code (as shown below) which used a meta tag to refresh an aspx page every second. It tests whether there is any content in a session variable, if not then it writes a timestamp to a text file, recreates the data in the variable and continues....
10
2635
by: Nils Erik Dall | last post by:
Hi All I have a problem with my asp code on an iis 6.0 server on windows 2003 web. When I redirect between to asp pages on my web-site, where pageA is in a different virtual directory from pageB the session variables value a lost. I know that it is the session ID there increases. (New session). If I make the same call in the same virtual directory the session variables is not lost. Is it some thing about different application pools? ...
3
1676
by: AlonR | last post by:
Hi, We're experiencing random user sessions losses on our web applications, and are researching for any useful information which may shed light on this problem. Environment: In our company, we're developing a web product based on ASP.NET 2.0, in conjunction with Oracle database over ADO.NET and external COM objects
2
4243
by: maxkumar | last post by:
Hi, I am running a ASP.NET 1.1 site on Win Server 2003 with IIS 6.0. The website has been running for about 1.5 years now. In the past, we used to have random cases of session variables getting lost, but not frequently. However, since the past 2 weeks, I am noticing an alarming increase of such session variables lost cases. My application log shows about 20-30 such errors every day. We have not changed anything at the server for a long...
5
3436
by: google | last post by:
I have a website that has a asp secured members only aria that keeps session variables to check if someone is logged in or not (if session variables are not there then redirect to logon screen) but I also have non members aria and I need a way of asking the user if they want to move away from the members only aria or go back to it. I have used an asp to find out if the page is a non member page and if there is a session variable there. If...
0
8378
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
8890
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8791
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...
1
8577
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
8653
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...
0
7398
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4202
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
4376
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2786
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.