J
jcode
I have an ASPNET application that has worked correctly on couple of
servers. I have just deployed it to another server and cannot resolve
an issue.
It appears as if the Session_Start is not firing or session state is
not being maintained.
First lines of Session_Start:
string loc = "LoadSettings";
Session.Add("Session_Start_Loc", loc);
Inside Page_Load of first page to be displayed:
try
{
sessionerr = Session["Session_Start_Loc"].ToString();
lblExc.Text += " Session_Start_Loc=" + sessionerr;
}
catch(Exception ex1){lblExc.Text += " Exception in Session_Start_Loc="
+ex1;}
try
{
Session.Add("Test", "Test");
lblExc.Text += " Test=" + Session["Test"].ToString();
}
catch {lblExc.Text += " Test=Failed to retrieve";}
The result is: Exception in
Session_Start_Loc=System.NullReferenceException: Object reference not
set to an instance of an object. at
Pharmacy.ComingSoon.Page_Load(Object sender, EventArgs e) Test=Test.
This means to me that either the Session_Start is not firing or the
Session is not being maintained. Any ideas?
I believe it is some kind of configuration issue.
servers. I have just deployed it to another server and cannot resolve
an issue.
It appears as if the Session_Start is not firing or session state is
not being maintained.
First lines of Session_Start:
string loc = "LoadSettings";
Session.Add("Session_Start_Loc", loc);
Inside Page_Load of first page to be displayed:
try
{
sessionerr = Session["Session_Start_Loc"].ToString();
lblExc.Text += " Session_Start_Loc=" + sessionerr;
}
catch(Exception ex1){lblExc.Text += " Exception in Session_Start_Loc="
+ex1;}
try
{
Session.Add("Test", "Test");
lblExc.Text += " Test=" + Session["Test"].ToString();
}
catch {lblExc.Text += " Test=Failed to retrieve";}
The result is: Exception in
Session_Start_Loc=System.NullReferenceException: Object reference not
set to an instance of an object. at
Pharmacy.ComingSoon.Page_Load(Object sender, EventArgs e) Test=Test.
This means to me that either the Session_Start is not firing or the
Session is not being maintained. Any ideas?
I believe it is some kind of configuration issue.