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. General Programming
  3. C#
  4. Session timeout problem

Session timeout problem

Scheduled Pinned Locked Moved C#
helpquestion
4 Posts 3 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.
  • A Offline
    A Offline
    ayyp
    wrote on last edited by
    #1

    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

    B D 2 Replies Last reply
    0
    • A 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

      D Offline
      D Offline
      Dustin Metzgar
      wrote on last edited by
      #2

      Is the system you're uploading to a web farm? Is the application distributed across multiple servers?


      Logifusion[^]

      1 Reply Last reply
      0
      • A 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

        B Offline
        B Offline
        Bogdan Damian
        wrote on last edited by
        #3

        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

        A 1 Reply Last reply
        0
        • B Bogdan Damian

          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

          A Offline
          A Offline
          ayyp
          wrote on last edited by
          #4

          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

          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