getting another error

Posted by Abhi_patil under ASP.NET on 5/7/2009 | Views : 1095 | Status : [Member] | Replies : 3
Error Message: Unable to validate data.

Stack Trace: at System.Web.Configuration.MachineKeySection.GetDecodedData(Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Int32& dataLength)
at System.Web.UI.ObjectStateFormatter.Deserialize(String inputString)




Responses

Posted by: Vuyiswamb on: 5/8/2009 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
Good Morning

There are Different Reason for your Error,

1)
The Error means the viewstate value is invalid. viewsource in the browser and compare to waht is recieved on the server. some proxies will truncate viewstate if its cover 2k.

2)
That happens because the key used to encrypt/decrypt view state got changed. This could happen if you are using a web farm (load balanced web servers) or the user kept the page open for a long duration.

Give fixed value in machineKey section in web.config ...

<configuration>
<system.web>
<machineKey validationKey='A96B2F3BF50A1A2A1B81214A550B89F2A318B3712FB5AC8CD82AF4F3925B3C6ED58CF5F38503629A78BF8C27B1B736C4E84DACE342AB83A42932B44EBC3D7601'
decryptionKey='D01201C69DF5E9863133028CBD4E6EEFC45B5E609D7F4107' validation='SHA1'/>
...
...

The default value for it is ...

<machineKey validationKey="AutoGenerate,IsolateApps"
decryptionKey="AutoGenerate,IsolateApps"
validation="SHA1"/>


Check this Links

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/gngrfmachinekeysection.asp


Make sure to follow minimum key length for the validation method used. Follow instructions in the above article.

You could also acheive the same by disabling the enableViewStateMac.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/gngrfpagessection.asp


Thank you for posting at Dotnetfunda

Vuyiswa Maseko

Thank you for posting at Dotnetfunda
[Administrator]

Abhi_patil, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Nareshgoradara on: 5/9/2009 [Member] Starter

Up
0
Down
This error is due to ViewStateMAC, Please disable it from web.config by setting EnableViewStateMAC="false" to web.config or at page level.


Abhi_patil, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Bernice on: 6/13/2009 [Member] Starter

Up
0
Down
Keep your computer running like new.
Have you been searching for a great antispyware to keep your computer running like new? If so, you will be happy to know that there are some great options out there. I have tried many different types of antispyware only to find that the majority of them find the exact same types of bugs. The biggest difference that you will find between all the different types of antispyware offered is the price. Orbasoft Antispyware is an excellent choice that can be purchased at a lower price than many of the other options available. If you are interested in discovering the benefits offered from antispyware solution from Orbasoft visit http://www.orbasoft.com to learn more.


Abhi_patil, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response