ajax button event not working after some idle time

Discussion in 'Site Programming, Development and Design' started by Alex Ramos, Aug 30, 2014.

  1. Hi,

    In my website i dessigned Updatepanel within that i placed some input controls(textbox, dropdownlist etc) within that updatepanel i placed one button. The problem is on production if user idle some time after 20 minutes enter some data and press the button then the button click event not fired, then i refresh the page enter the input then press button then its fired.

    Can you please advise how to fix it?

    Thanks,

    Alex Ramos
     
  2. ComputerMan

    ComputerMan Winhost Staff

    Our server will recycle if no HTTP calls are made within 20 minutes. If the application pool is recycled the sessions will be lost. You might want to consider using SQL Server sessions to store the sessions information on the SQL database. That way if the application pool recycles. The sessions is saved on the SQL Server. Our knowledge base article will show you how to enable SQL Server sessions for your site account here: https://support.Winhost.com/KB/a626/how-to-enable-aspnet-sql-server-session-on-your-web.aspx
     
    Last edited by a moderator: Oct 14, 2015
    Michael likes this.
  3. We did the change to save the sessions to SQL Server as you suggested but unfortunately it didn't fix the isssue. All web pages stop working after 20 minutes of inactivity. We created a test page and it shows the new session time out which is 60 minutes but still pages stop working after 20 minutes. Something we noticed in a simple web page, no ajax, the only thing it does is an auto-postback that after the 20 minutes it gives the error:"Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster"

    Thanks.
     
  4. Last edited by a moderator: Oct 14, 2015
    ComputerMan and Michael like this.

Share This Page