viewstate error

Typ0

Perch
Has anyone dealt with the below error? what key did you use to solve it in this server farm?

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.
 
I am not sure actually. I'm a jodohost reseller using hsphere. So if I'm on a web farm is one of the questions I'm trying to get answered here. And then, of course, how to make this issue go away as it's annoying. thank you for the reply.
 
If you are running here, you aren't running on a web farm.

I need to know more about the application you are running.

Are you dynamically generating controls or user controls? You generally get this error on a stand alone server when the controls you used to create a page are not the same controls that got loaded on the postback.

Does this same app work when you run it on your local computer?
 
it seems to happen to me when i go to a page and then walk away from the computer...then I come back and try to log in. It's like my logon control is being rendered with viewstate...and then the application is generating a new viewstate when you try and log in after it sits for a while.

I do have a lot of custom user controls in use. they use datagrids and datareaders to display data amongst other things.
 
It sounds like the ViewState hash is set to "auto" in the server's machine.config file. If this is true then you'd get a new key everytime the app pool recycles.

Fortunately, you should be able to override those values in web.config

Go here and create your machineKey element ASP.NET Resources - Online tool to create keys for view state validation and encryption and then place it in your web.config file inside the <system.web> element that is nested insite the top level element named <configuration>

If I'm right about the problem, this should fix your issue.
 
It sounds like the ViewState hash is set to "auto" in the server's machine.config file. If this is true then you'd get a new key everytime the app pool recycles.

Fortunately, you should be able to override those values in web.config

Go here and create your machineKey element ASP.NET Resources - Online tool to create keys for view state validation and encryption and then place it in your web.config file inside the <system.web> element that is nested insite the top level element named <configuration>

If I'm right about the problem, this should fix your issue.

Thank you for the response. It seems to be working.
 
It sounds like the ViewState hash is set to "auto" in the server's machine.config file. If this is true then you'd get a new key everytime the app pool recycles.

Fortunately, you should be able to override those values in web.config

Go here and create your machineKey element ASP.NET Resources - Online tool to create keys for view state validation and encryption and then place it in your web.config file inside the <system.web> element that is nested insite the top level element named <configuration>

If I'm right about the problem, this should fix your issue.

can you articulate the security concerns with this solution?
 
Back
Top