Validation of Viewstate MAC fail

Discussion in 'General troubleshooting' started by Wee Yik Gan, May 20, 2014.

  1. mjp

    mjp

  2. I implemented the solutions. So far this error never occurred again.

    I apologize for creating new thread without doing a detail search first.
    Thanks & case close.
     
  3. Hi,

    It seems like after I implemented the MachineKey, the Session get timeout very often. (Sometimes less than 1 min)

    I am not sure is this the rootcause or not.
    http://stackoverflow.com/questions/10555000/losing-session-state-with-asp-net-sql-server

    I need help on this because this is the first time I deploy a webpage to web farm (Is it ?).
    Thus things like Machine Key and this are something I never encounter before.

    Thanks in advance, DiscountASP.net support.
     
  4. martino

    martino DiscountASP.NET Staff

    Sounds like you're losing your sessions.

    You will lose your sessions if the application pool is recycled.

    We host each website in its own unique application pool/process. To conserve memory, we recycle the application if any of the following conditions are met:

    1) More than 20 minutes of idle time (no http request in 20 minutes)
    2) The application uses more than 100 MB of memory on IIS 6, 200 MB of memory on IIS 7, and 300 MB of memory on IIS 8.
    3) The application uses more than 70% of CPU time. On our IIS 8 servers the CPU is throttled so you may experience same latency.

    You can keep your session if your application pool recycles if you use SQL Server sessions. More about this can be found in our knowledge base article here: https://support.discountasp.net/KB/a334/how-to-enable-aspnet-sql-server-session-on-your-web.aspx
     
    mjp likes this.
  5. Thanks for the response.

    I had set the Session Timeout equal to 20 minutes at web config.
    Usually my session storing a DataTable nearly 6000 rows of data with 7 columns. (Mostly decimal)

    I am not sure the Session lost due to app-pool recycle or otherwise, is there anyway for me to get a log/history ?
    So if I can confirm this cause by frequent app-pool recycling, then I will consider implement SQL Server Sessions.
     
  6. martino

    martino DiscountASP.NET Staff

    You can contact support and ask them to check your Event logs to see if the application pool is recycling and for what reason.
     
  7. My application is a long form that may take more than 20 minutes to complete. Can I explicitly set the Timeout to 60 minutes and overwrite the 20-minute rule?
     
  8. martino

    martino DiscountASP.NET Staff

    mjp likes this.

Share This Page