Ive been using the following code for the last week and its worked no problem, then for some reason this morning its throwing:
System.NullReferenceException: Object reference not set to an instance of an object.
My code:
DataSet icanData = (DataSet)HttpContext.Current.Session["icanDataSession"];
if (!(icanData == null))
{
return icanData;
}
The reason I'm using HttpContext.Current.Session
is because its running in a class.