Session Expire Problem
-
Hi all, I have developed a website and it is live now! In this website, i am using a session lot of time. My session setting in Web.config Problem is, session is expire after few minute.. i m frusted what shoud i do for that.... Error is.... The error description is as follows : System.Web.HttpUnhandledException: Exception of type System.Web.HttpUnhandledException was thrown. ---> System.IndexOutOfRangeException: There is no row at position 0. at System.Data.DataRowCollection.get_Item(Int32 index) at Sojourn.Add_new_Subs.Get_Data(Int32 final_id) at Sojourn.Add_new_Subs.rb_change(Object sender, EventArgs e) at System.Web.UI.WebControls.ListControl.OnSelectedIndexChanged(EventArgs e) at System.Web.UI.WebControls.RadioButtonList.System.Web.UI.IPostBackDataHandler .RaisePostDataChangedEvent() at System.Web.UI.Page.RaiseChangedEvents() at System.Web.UI.Page.ProcessRequestMain() --- End of inner exception stack trace --- at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain() at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequest(HttpContext context) at System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionSte p.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) Any Idea about that.... thanx Sajjad
-
Hi all, I have developed a website and it is live now! In this website, i am using a session lot of time. My session setting in Web.config Problem is, session is expire after few minute.. i m frusted what shoud i do for that.... Error is.... The error description is as follows : System.Web.HttpUnhandledException: Exception of type System.Web.HttpUnhandledException was thrown. ---> System.IndexOutOfRangeException: There is no row at position 0. at System.Data.DataRowCollection.get_Item(Int32 index) at Sojourn.Add_new_Subs.Get_Data(Int32 final_id) at Sojourn.Add_new_Subs.rb_change(Object sender, EventArgs e) at System.Web.UI.WebControls.ListControl.OnSelectedIndexChanged(EventArgs e) at System.Web.UI.WebControls.RadioButtonList.System.Web.UI.IPostBackDataHandler .RaisePostDataChangedEvent() at System.Web.UI.Page.RaiseChangedEvents() at System.Web.UI.Page.ProcessRequestMain() --- End of inner exception stack trace --- at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain() at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequest(HttpContext context) at System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionSte p.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) Any Idea about that.... thanx Sajjad
Its not a session problem. Your are not getting any rows do a try catch when you retrieve the rows. Your are getting an error there more tham likely. Also use a foreach when you go through the rows to avoid the OutOfRange error. 1 line of code equals many bugs. So don't write any!!
-
Its not a session problem. Your are not getting any rows do a try catch when you retrieve the rows. Your are getting an error there more tham likely. Also use a foreach when you go through the rows to avoid the OutOfRange error. 1 line of code equals many bugs. So don't write any!!
thanx for reply, when i login it working fine.... but after some time i visit this page again... it give error... basically, i getting some value from database and show in web form... and session involed when i getting the values from data base.... i think my problem is clear..... Thanx Once again Sajjad
-
thanx for reply, when i login it working fine.... but after some time i visit this page again... it give error... basically, i getting some value from database and show in web form... and session involed when i getting the values from data base.... i think my problem is clear..... Thanx Once again Sajjad