Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

267
Views
Random Invalid Viewstate Error

I know there are a lot of questions on this topic and I have read them all.

I'm using IIS8, .Net 4.5.

Users randomly get an invalid viewstate error, I can't figure it out. Once this happens the only way they can get back into the site is to clear browser cache.

In my web.config I have:

<system.web>
<machineKey validationKey='....key here'   decryptionKey='....decrypt key is valid here'   validation='SHA1'/>
    <!--<hostingEnvironment shadowCopyBinAssemblies="false" />-->
    <authentication mode="None" />
    <compilation targetFramework="4.5.1" />
    <httpRuntime targetFramework="4.5.1" />
...
</system.web>

I'm running on a virtual private server, and I've yet to find a viewstate larger than 9kb.

My application pool is set to restart at 3:00am, once per day.

My page uses update panels, maybe the user is clicking 'back'? But I've seen it happen just visiting the page with no clicking back.

One thing I noticed is I have 3 different sites using the same application pool identity, but the application pools are seperate. There is no machine keys in machine.xml, but only in my web.config.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

A couple of possibilities to investigate:

  1. Update panels are changing form field values (which are what is used to compute ViewState), then the page gets POSTed back to the server, where the new values make validation fail. See this post

  2. You have caching enabled (perform a trace of HTTP headers - make sure you don't have dev tools open) which is causing invalid ViewState to be generated w/ UpdatePanel gumming things up.

  3. Are you using Server.Execute anywhere? (see above link for same)

  4. (less likely) Does your "Virtual Private Server" get migrated to different hardware (perhaps without you knowing it)?

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!