473,795 Members | 3,441 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

FIXED: ASP Session stopped working across pages

Thought I'd post this in case it's useful to other searchers in the future.

On one of my sites I noticed that session variables had suddenly stopped
persisting across pages. Some things I had done that may have caused this
included installing the .Net framework on my server, and installing VS.Net
EA on my workstation. I had also migrated the server to active directory.

All of a sudden session variables were loosing their values if persisted
across pages (i.e. they still seemed to work on the same page on which the
value was assigned). The site concerned had an underscore in it's name. This
turned out to be the problem.

The problem was fixed by adding another identity to the site with a hostname
does not include an underscore. Open properties for the site in question and
on the Web Site tab click the Advanced... button. Use the same IP address
and Port for the new identity, but add a host header name without an
underscore. Add a new DNS alias record if required.

Make sure you browse the site using this new hostname. I left the old
hostname set up (the one with the underscore) so I didn't have to change
references in Interdev, etc. Fixed it for me.

Someone might like to comment on what the specific cause of this problem is.

Hope this helps,

Alan
Jul 19 '05 #1
4 3695
> Someone might like to comment on what the specific cause of this problem
is.

http://www.aspfaq.com/2157
http://support.microsoft.com/?kbid=316112
Jul 19 '05 #2
"Aaron Bertrand [MVP]" <aa***@TRASHasp faq.com> wrote in message
news:%2******** *******@TK2MSFT NGP09.phx.gbl.. .
Someone might like to comment on what the specific cause of this problem

is.

http://www.aspfaq.com/2157
http://support.microsoft.com/?kbid=316112


Thanks for that - I must have been caught out by the upgrade to IE6 (with
VS.Net EA I think) or an automatic update. On another note I didn't realise
that underscores weren't legal - I'll have to keep that in mind.

Cheers,

Alan
Jul 19 '05 #3
> Thanks for that - I must have been caught out by the upgrade to IE6 (with
VS.Net EA I think) or an automatic update. On another note I didn't realise that underscores weren't legal - I'll have to keep that in mind.


Yes, it's not documented very well (and I think underscores should be
illegal in machine names since they cause this kind of problem).

There is another similar case, using server.mappath. I can legally create a
folder within windows, called "my,folder, " but because of the comma, this
will break server.mappath.

A
Jul 19 '05 #4
When you attempt to name an NT5+ machine with an underscore, you are
presented with a large warning about doing so. For some reason, some people
(i.e., my coworkers) choose to ignore this warning and forge ahead...

Ray at work
"Aaron Bertrand [MVP]" <aa***@TRASHasp faq.com> wrote in message
news:%2******** **********@TK2M SFTNGP11.phx.gb l...
Thanks for that - I must have been caught out by the upgrade to IE6 (with VS.Net EA I think) or an automatic update. On another note I didn't realise
that underscores weren't legal - I'll have to keep that in mind.


Yes, it's not documented very well (and I think underscores should be
illegal in machine names since they cause this kind of problem).

There is another similar case, using server.mappath. I can legally create

a folder within windows, called "my,folder, " but because of the comma, this
will break server.mappath.

A

Jul 19 '05 #5

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

Similar topics

1
3113
by: Ann Leland | last post by:
I have been using session variables to pass a user name from one ASP page to another inside framesets for 9 months and it stopped working this week. I have made no code changes but there was a "security update" installed on the server a few days ago but I can't find out exactly what it was. In the research I have done I found many articles on the subject of session variables in ASP pages inside framesets. From what I read a new...
6
2566
by: Nedu N | last post by:
Hi, I am trying to design a Home page for my applicatiion in which i want show the links for for some itms... I tried to put the following <td> <font face="Arial, Helvetica, sans-serif" color="#ffffff" size="2"> Contact | My Profile | Logout /font> </td>
3
1210
by: Jeff Shantz | last post by:
Hello, I've got two classes: EventLog and ErrorLog. I need to access Session state from these classes, but they are not associated with ASPX pages. So I've been accessing the Session object through HttpContext.Current.Session. This was working fine for several months. Suddenly, ErrorLog stopped being able to "see" the Session object. I made no changes, so I'm frankly quite stumped. They both import the same namespaces, yet when
1
237
by: jpopper | last post by:
Hi, I am currently supporting a website that is a mix of asp and aspx pages. In one scenario I redirect the user from an asp page, to an aspx page, and then back to the asp page. When I return to the asp page, I find that *sometimes* a new session has been created. (I.e., session.sessionid is different. Thus, I lose session state, etc.). The session timeout is the default of 20. What is odd, is that on one development machine (Windows...
9
5317
by: McGeeky | last post by:
Is there a way to get a user control to remember its state across pages? I have a standard page layout I use with a header and footer as user controls. Each page uses the same layout by means of copy paste (I hear this will improve in ASP.Net 2 via master pages). When I navigate from one page to the next the header and footer user controls lose their state because they are effectively different instances of the user control. Is there...
1
1706
by: chunt | last post by:
Hi Folks I've seen lots of people with this problem and had it myself, having solved it for myself I thought I'd post my issue on here in case it helps anyone. The problem was that a session variable wasn't being maintained across pages and I read all the stuff here http://www.aspfaq.com/2157 and it didn't help me. This may not solve everyones issue but it sorted mine and obviously it doesn't apply to IIS 5: You should check is how...
4
1926
by: Parrot | last post by:
For some reason my Session state stopped working in my webpages. I cannot pass a variable from one webpage to another using the Session. For example: Web page 1: Session = dbname; Response.Redirect("Webpage2"); Webpage 2:
1
1547
by: Shahar Nechmad | last post by:
I'm using ASP.NEt 2.0. I use the session to save important information about the user current session (for example the current project he is working on). I use those variables in almost every web page in the application. When a user session times out, I want to be able to make the user to relogin and continue working with the application. 1. Is there easy way to catch an even just before the session times out? Or to prelong a session (so...
8
1997
by: Michael Schwarz | last post by:
Hi, I have a problem where I have two requests (i.e. two different windows that are using the same session) that are accessing the session collection. The requests will need more time on the server, but I get the problem that the two sessions are not getting updated values from each requests. Is this by design or is there any solution to do this? -- Best regards | Schöne Grüße
0
9672
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
10214
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
10164
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
10001
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
9042
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...
1
7538
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
5563
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4113
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
2
3723
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.