Welcome to weblogs.com.pk Sign in | Join | Help

HttpException :: Unable to validate data

If you are receiving HttpExceptions in your ASP.NET applications on postbacks; saying, Unable to validate data, you may try setting enableViewStateMac to true. You can do so at page level or for entire site in web.config.

<configuration>
 <system.web>
  <pages enableViewStateMac="false" />
 </system.web>
</configuration>

After doing above, if you experience session end problems or continue to receive the same error; it may be due to certain resource-capping features of the IIS, Operating System itself or some third party solution.

Request your ISP to remove any restriction, or you don’t use sessions in your web application.

Another thing you can try is to define machine keys in web.config

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

Published Thursday, October 6, 2005 10:09 AM by khurram

Comments

No Comments

New Comments to this post are disabled