I read somewhere that to get a session going I need to access it in the Global.asax Session_Start function. So I do this:
void Session_Start(object sender, EventArgs e)
{
// Calling this starts the Session object...
string sSessionIdA = HttpContext.Current.Session.SessionID;
Debug.WriteLine("sSessionIdA="+sSessionIdA);
if (HttpContext.Current.Session == null)
{
Debug.WriteLine("null session");
}
else
{
Debug.WriteLine("There is a session");
HttpContext.Current.Session["ImageWidth"] = 100;
HttpContext.Current.Session["ImageHeight"] = 200;
}
}
And I get the "There is a session" message, though sSessionIdA seems to be empty.
I create the ImageWidth ...
Go to the complete details ...