I check for a session variable in my asp.net page and redirect to my default page.
if (Session["OrgId"] != null)
{
// some logic
}
else
{
Response.Redirect("../Default.aspx?Sid=1", false);
}
and in my default.aspx page i ve done this,
Int64 id = GetId(Request.RawUrl.ToString());
if (id == 1)
{
// I ll show "Session Expired"
}
public Int64 GetId(string url)
{
Int64 id = 0;
if (url.Contains("="))
{
if (url.Length > url.Substring(url.LastIndexOf("=")).Length)
{
id = Convert.ToInt64(url.Substring(url.LastIndexOf("=") + 1));
}
}
return id;
}
This works in googlechrome,firefox but not in IE. "Operation aborted" exception.