Sys.WebForms.PageRequestManagerServerErrorExceptio n: Validation of viewstate

Discussion in 'General troubleshooting' started by sbower1, Jan 16, 2011.

  1. sbower1

    sbower1 VZW

    I’m receiving this error below on an asp.net page that seems to be random and is reproduced on every major browser.

    The page has two dropdown list controls that are synchronized to a detail view control. Everything works as advertized on my local machine, but when I try it through my domain I get an error. This issue like I stated is random because I can select different items in either dropdown several times, and select the edit/update button within the default view control without any problems. Then after a while the browser will lock up and display this error down at the bottom on IE, or through debugger on other browsers. It seems to be more of a problem in IE then FF or Google Chrome, but the issue is present with every browser I have tested.

    The page is developed with Ajax and has a script manager and update panel on the site master. I have recycled the site several times after uploading changes.

    Any help is appreciative!

    Message: Sys.WebForms.PageRequestManagerServerErrorException: 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.
     
  2. Ray

    Ray

    Do you need to have viewstate max enabled? If not I suggest you disable it.

    The symptoms you are experiencing suggest that your application pool is being recycled by our server.

    We host each website in its unique application pool / process. To ensure server stability 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 memory for Basic plan and 200 MB for Max and Ultimate plan
    3) The application uses more than 70% of CPU resources for more than 3.5 minutes

    I suggest you optimize your web application so that it does not meet any of these conditions.
     
  3. sbower1

    sbower1 VZW

    The page that I am talking about is posting back from one of the dropdown list that calls a Link queries in the background to update the data view. This is more than likely the problem since I was rapidly going through the list reaching the 70% threshold.

    I’ve seen this same reply in other posting within this forum, and have always wondered what exactly does this mean: 3) The application uses more than 70% of CPU resources for more than 3.5 minutes.

    If I have multiple users on my domain each with their own instance of this particular page it would not take long to reach this limit. So is this 70% CPU resource for each instance, or is it combined with every user on the site?

    I was unable to find any reference to “Viewstate Max” that you referred to when I Google it, so could you elaborate on what this property/attribute is and where to set it?

    I took a look at the view state properties for each of the tree controls on the page and they were set to true or inherit by default. The detailed view control property was set to inherit, so I changed to enabled and retest with the same results. If I set the view state to false, then I believe the page must reload the entire contents each time a post back occurs for these controls. Setting it to false would increase the CPU usage and create more of an issue with the 70% CPU cap we are dealing with correct? This is just speculation on my part.

    Shawn
     
  4. Ray

    Ray

    The CPU limitation is a total consumption not just per call or per browser incident. Base on what you said it does sound likely that you maybe hitting the CPU threshold. Actually to get an accurate answer for this, it is best you open a ticket to our technical support department. Let them know what is occurring and give them detailed instructions on how to replicate the problem and they should be able to monitor the server in real time and let you know what threshold is being breached.

    If you want to learn more about ASP.Net View State, try looking at this link.

    http://msdn.microsoft.com/en-us/library/ms972976.aspx
     
  5. sbower1

    sbower1 VZW

    The link on view state was very informative.....Thanks
     

Share This Page