G
Guest
Here's my code:
private void Page_Load(object sender, System.EventArgs e)
{
clientId = Session["clientId"].ToString();
.... etc.
It bombs on the assignment after the session has timed out
(System.NullReferenceException: Object reference not set to an instance of an
object). I don't understand why it is processing the page load event at all.
It should already have redirected, shouldn't it?
if I modify the code to do the redirection, it does not help and I get a 404:
private void Page_Load(object sender, System.EventArgs e)
{
if (Session["clientId"]==null)
{
Response.Redirect("Login.aspx",true);
}
}
The mechanism seems to be magical. I cannot debug it. Anyone any clue
what's going on?
TIA,
Jeb.
private void Page_Load(object sender, System.EventArgs e)
{
clientId = Session["clientId"].ToString();
.... etc.
It bombs on the assignment after the session has timed out
(System.NullReferenceException: Object reference not set to an instance of an
object). I don't understand why it is processing the page load event at all.
It should already have redirected, shouldn't it?
if I modify the code to do the redirection, it does not help and I get a 404:
private void Page_Load(object sender, System.EventArgs e)
{
if (Session["clientId"]==null)
{
Response.Redirect("Login.aspx",true);
}
}
The mechanism seems to be magical. I cannot debug it. Anyone any clue
what's going on?
TIA,
Jeb.