By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,302 Members | 1,788 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,302 IT Pros & Developers. It's quick & easy.

session variables are lost when logged into app first time

P: n/a
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:HyperLink id="lnkClick" runat="server" ForeColor="Snow"
Font-Italic="True" Font-Size="Small"
Font-Underline="True" Font-Names="Arial" Target="_self"
Font-Bold="True">here</asp:HyperLink>
Code behind has the following code
lnkClick.NavigateUrl = Convert.ToString("Files12/Z_All_allReports.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
Share this Question
Share on Google+
1 Reply


P: n/a
"SM" <SM@discussions.microsoft.comwrote in message
news:A2**********************************@microsof t.com...
....
Code behind has the following code
lnkClick.NavigateUrl = Convert.ToString("Files12/Z_All_allReports.aspx")
Why do you need Convert.ToString?
>
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 NullReferenceException. This would show
whether the exception is due to missing session state.

John
Feb 28 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.