protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
try
{
if (Session["username"] != null)
{
lblUserName.Text = Session["username"].ToString();
lblTodayDate.Text = DateTime.Today.Date.ToString();
}
else
{
Response.Redirect("~/SessionExpired.aspx");
}
}
catch (Exception exp)
{
WebFormMaster.WriteToErrorLog("", exp);
}
}
}
when i was run this code in my local system it is working successfull, but when i was hosted this code in server some times it shows session experied, but i gave session timeout is 60 minuts, can any body suggest me.
it shows error message like this:
System.Threading.ThreadAbortException: Thread was being aborted.
at System.Threading.Thread.AbortInternal()
at System.Threading.Thread.Abort(Object stateInfo)
at System.Web.HttpResponse.AbortCurrentThread()
at System.Web.HttpResponse.End()
at System.Web.HttpResponse.Redirect(String url, Boolean endResponse, Boolean permanent)
at SFISSPACE.Admin_AdminMaster.Page_Load(Object sender, EventArgs e)
[Edit]: