M
mikeachamberlain
Hello.
On our website we occasionally get the dreaded error:
Exception:
System.Web.HttpException
Unable to validate data.
Stack trace:
at System.Web.Configuration.MachineKey.GetDecodedData(Byte[] buf,
Byte[] modifier, Int32 start, Int32 length, Int32& dataLength)
at System.Web.UI.LosFormatter.Deserialize(String input)
Viewstate (example):
dDwtMjk4NDUyOTEyOzs+HhqaxzF2H593HEX/Hn/ArvKK7AU=
Machine Key tag from Web.config (modified slightly here for security):
<machineKey
validationKey='XXXXXXXXXXXXXXXX1B81214A550B89F2A318B3712FB5AC8CD82AF4F3925B3C6ED58CF5F38503629A78BF8C27B1B736C4E84DACE342AB83A42932B44EBC3D7601'
decryptionKey='XXXXXXXXXXXXXXXX3133028CBD4E6EEFC45B5E609D7F4107'
validation='SHA1'/>
I have scoured google for months trying to solve this problem. I can
confirm:
- we are not using a cluster / webfarm
- we are not using any Server.Transfers (eg. the viewstate is being
posted back to the correct page as far as we can see)
- we have manually set the encryption / decryption key in Web.config as
above
- the site runs in its own application pool, and recycling of the
worker process is disabled
The site will run fine for weeks, then suddenly we may get a multiple
instances of these come through at once from at least two different
users. It is only ever on one specific page though. This page does
not create any controls dynamically.
The example viewstate above does indeed appear to be invalid when we
try to run it through a view state decoder.
I am completely stuck and the boss is losing patience! Can anyone
help?
Mike
On our website we occasionally get the dreaded error:
Exception:
System.Web.HttpException
Unable to validate data.
Stack trace:
at System.Web.Configuration.MachineKey.GetDecodedData(Byte[] buf,
Byte[] modifier, Int32 start, Int32 length, Int32& dataLength)
at System.Web.UI.LosFormatter.Deserialize(String input)
Viewstate (example):
dDwtMjk4NDUyOTEyOzs+HhqaxzF2H593HEX/Hn/ArvKK7AU=
Machine Key tag from Web.config (modified slightly here for security):
<machineKey
validationKey='XXXXXXXXXXXXXXXX1B81214A550B89F2A318B3712FB5AC8CD82AF4F3925B3C6ED58CF5F38503629A78BF8C27B1B736C4E84DACE342AB83A42932B44EBC3D7601'
decryptionKey='XXXXXXXXXXXXXXXX3133028CBD4E6EEFC45B5E609D7F4107'
validation='SHA1'/>
I have scoured google for months trying to solve this problem. I can
confirm:
- we are not using a cluster / webfarm
- we are not using any Server.Transfers (eg. the viewstate is being
posted back to the correct page as far as we can see)
- we have manually set the encryption / decryption key in Web.config as
above
- the site runs in its own application pool, and recycling of the
worker process is disabled
The site will run fine for weeks, then suddenly we may get a multiple
instances of these come through at once from at least two different
users. It is only ever on one specific page though. This page does
not create any controls dynamically.
The example viewstate above does indeed appear to be invalid when we
try to run it through a view state decoder.
I am completely stuck and the boss is losing patience! Can anyone
help?
Mike