G
Guest
I've migrated an application from VS 2003 to VS 2005. It worked fine in
2003; but I've been having issue in 2005. The latest is dealing with a
DataSet that I have as an Application Variable. It seems to disappear when
the users session times out. What really weird is that it works fine on my
development box; but flakes out on the server. I added a button to a dummy
webpage to reload the Application variable; but it still disappears after the
session timeout.
Could the DataSet in the application variable be a reference, and that when
the session that created that dataset times out that reference is now being
set to null. If so, how do I get arround that?
I am loading the dataset via a webservice; but the same webservice loads the
development box application data just fine. Yes, the web config files point
to the same url for the webservice.
Snippet of code from Global.asax.cs
protected void Assign_Standard_Data()
{
try
{
localhost.LnD_Hydraulic_General proxy = new
LnD_HydraulicApplication.localhost.LnD_Hydraulic_General();
DataSet Standard_CDs = proxy.Get_STDCodes("VALID");
if (Standard_CDs != null)
{
Application["Standard_Data"] = Standard_CDs;
}
else
{
throw new Exception("Global:Assign_Standard_Data - Unable to access
STDCodes Database.");
}
}
catch (Exception error)
{
throw new Exception(error.ToString());
}
}
protected void Application_Start(Object sender, EventArgs e)
{
Application["Support.Email"] = "(e-mail address removed)";
Assign_Standard_Data();
}
protected void Session_Start(Object sender, EventArgs e)
{
if (Application["Standard_Data"] == null)
{
Assign_Standard_Data();
}
}
Any help would be appreciated.
2003; but I've been having issue in 2005. The latest is dealing with a
DataSet that I have as an Application Variable. It seems to disappear when
the users session times out. What really weird is that it works fine on my
development box; but flakes out on the server. I added a button to a dummy
webpage to reload the Application variable; but it still disappears after the
session timeout.
Could the DataSet in the application variable be a reference, and that when
the session that created that dataset times out that reference is now being
set to null. If so, how do I get arround that?
I am loading the dataset via a webservice; but the same webservice loads the
development box application data just fine. Yes, the web config files point
to the same url for the webservice.
Snippet of code from Global.asax.cs
protected void Assign_Standard_Data()
{
try
{
localhost.LnD_Hydraulic_General proxy = new
LnD_HydraulicApplication.localhost.LnD_Hydraulic_General();
DataSet Standard_CDs = proxy.Get_STDCodes("VALID");
if (Standard_CDs != null)
{
Application["Standard_Data"] = Standard_CDs;
}
else
{
throw new Exception("Global:Assign_Standard_Data - Unable to access
STDCodes Database.");
}
}
catch (Exception error)
{
throw new Exception(error.ToString());
}
}
protected void Application_Start(Object sender, EventArgs e)
{
Application["Support.Email"] = "(e-mail address removed)";
Assign_Standard_Data();
}
protected void Session_Start(Object sender, EventArgs e)
{
if (Application["Standard_Data"] == null)
{
Assign_Standard_Data();
}
}
Any help would be appreciated.