473,569 Members | 2,791 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

session variables are lost when logged into app first time

Background
We migrated our Asp.net 1.1 application to Asp.net 2.0 ( just migration )
.. It was working fine in local developer machine and one of our development
testing server.
When we moved to staging server which is also running on windows 2000 server
and we started facing a peculiar issue.
We are able to login successfully every time , however , a click on a link
to move to a a different page on a hyper link.

<asp:HyperLin k id="lnkClick" runat="server" ForeColor="Snow "
Font-Italic="True" Font-Size="Small"
Font-Underline="True " Font-Names="Arial" Target="_self"
Font-Bold="True">her e</asp:HyperLink>
Code behind has the following code
lnkClick.Naviga teUrl = Convert.ToStrin g("Files12/Z_All_allReport s.aspx")
What is the issue ?
When the new page is launched , it ends in null reference exception as the
session variables loaded in the previous page were lost.

Our session state is still inproc .
Is it due to any settings on the web server.
Any information is highly appreciated .

Feb 28 '07 #1
1 1461
"SM" <SM@discussions .microsoft.comw rote in message
news:A2******** *************** ***********@mic rosoft.com...
....
Code behind has the following code
lnkClick.Naviga teUrl = Convert.ToStrin g("Files12/Z_All_allReport s.aspx")
Why do you need Convert.ToStrin g?
>
What is the issue ?
When the new page is launched , it ends in null reference exception as the
session variables loaded in the previous page were lost.

Our session state is still inproc .
Is it due to any settings on the web server.
I don't see any reason for your session state to be lost. Please show us why
you believe that your session state is being lost.

A simple test would be to place a Response.Write( Session["KEY"]) before the
place where you're getting the NullReferenceEx ception. This would show
whether the exception is due to missing session state.

John
Feb 28 '07 #2

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

Similar topics

9
3630
by: Pack Fan | last post by:
I've noticed that session variables will persist on Mac IE even after all browser windows have been closed. One must quit the program to clear the session variables. This presents a security risk for my session variable based security scheme. Basically, the risk is that a user will login to my site, close the window when done and allow...
14
3207
by: Paul Yanzick | last post by:
Hello, I am trying to develop a book tracking application for my capstone in school, and am running into a problem. The application is an ASP.Net application written in C#. The first page you go to is a login form, which will set several session variables with the name used to log in, appropriate security level and some other misc...
2
1396
by: P. Prosper | last post by:
Hello all I have a small webform application with three WebForms that use session variables to maintain session data (user name) When I transfer to page 2 from page1 session state is transferred OK, but is lost when I use a command button to transfer from page2 to page3. It seem to have something to do with a timeout of some sort...
5
548
by: Sean | last post by:
Problem with sessions I have created an application without concern for sessions. As it turns out I think that might be my undoing. What I have: I have an online quiz. I don’t need to know users or save any data. If the application crashes or user exits the program they should simply start again. Pretty basic. All interactions are...
2
2587
by: competitions | last post by:
I notice that others have had this problem, after scanning Google, but I couldn't find any solution. I have tested my PHP code on both Mac's & PC's and on several browsers (Firefox, Safari, IE etc etc), with several operating systems. Everything works fine, except ... On a couple of Windows XP SP2 PC's session variables in IE6 seem from...
4
2861
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,...
26
3587
by: BillE | last post by:
Some ASP.NET applications use Session Variables extensively to maintain state. These should be re-written to use viewstate, hidden fields, querystring, etc. instead. This is because if a user opens a new IE window with Ctrl-N or File-New-Window, BOTH WINDOWS SHARE THE SAME SESSION VARIABLES. This cannot be prevented.
14
2239
by: Rick | last post by:
We are in the process of testing a large web project that I converted from VS 2003 to VS 2005. Everything seems to be working except for a few minor things. But the main issue I have is this, I have about 5 or 6 developers testing this web site in a staging environment on a Microsoft 2003 Server box. We have a base page that gets called on...
24
4073
by: Pink Pig | last post by:
I'm trying to track down an annoying problem that only occurs when I access my pages on a remote server using IE6. If I run instead run from localhost, IE6 works fine, and if I use another browser on the remote site, there are no problems. I'm not really looking for help debugging. I'd just like to be pointed in the right direction. ...
0
7693
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
7605
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...
0
7917
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. ...
1
7665
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
7962
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...
1
5501
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...
0
5217
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...
1
1207
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
933
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.