Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Session Expire Problem

Session Expire Problem

Scheduled Pinned Locked Moved ASP.NET
helpdatabasedesigndata-structuresdebugging
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    imshally81
    wrote on last edited by
    #1

    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

    I 1 Reply Last reply
    0
    • I imshally81

      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

      I Offline
      I Offline
      Ista
      wrote on last edited by
      #2

      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!!

      I 1 Reply Last reply
      0
      • I Ista

        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!!

        I Offline
        I Offline
        imshally81
        wrote on last edited by
        #3

        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

        I 1 Reply Last reply
        0
        • I imshally81

          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

          I Offline
          I Offline
          Ista
          wrote on last edited by
          #4

          imshally81 wrote:

          i think my problem is clear.....

          Your right. Your not returning any rows. Check your query and use a foreach instead of a for loop. 1 line of code equals many bugs. So don't write any!!

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups