Session timeout problem
-
hi all,in my web config i set the timeout="120" and i use some session variables in my page load event,it works fine in my local system, when i upload it, it shows null reference error(not all time but some times).when i work contineously it work fine if i leave for a minutes it show null reference error........what to do?...any remedy?:confused: Regards, ayyp
-
hi all,in my web config i set the timeout="120" and i use some session variables in my page load event,it works fine in my local system, when i upload it, it shows null reference error(not all time but some times).when i work contineously it work fine if i leave for a minutes it show null reference error........what to do?...any remedy?:confused: Regards, ayyp
Is the system you're uploading to a web farm? Is the application distributed across multiple servers?
-
hi all,in my web config i set the timeout="120" and i use some session variables in my page load event,it works fine in my local system, when i upload it, it shows null reference error(not all time but some times).when i work contineously it work fine if i leave for a minutes it show null reference error........what to do?...any remedy?:confused: Regards, ayyp
That's strange. I suggest to put a Breakpoint on Session_End method from Global.asax just to be sure that the session timeout is the problem. damianbc
-
That's strange. I suggest to put a Breakpoint on Session_End method from Global.asax just to be sure that the session timeout is the problem. damianbc
yes,i try it using try and catch block in my coding it thro catch block error here is code private void Page_Load(object sender, System.EventArgs e) { try { lbluser.Text="Welcome "+Session["name"].ToString()+"..."; } catch { MessageBox.Show("UserName is Empty"); } } :confused: Regards, ayyp