Hi all,
Hope someone can help with this - I am tearing my hair (singular) out.
I developed an application using asp.net 2.0 and Mobile Controls. Up till now I have been testing it with a Pocket PC which runs a version of Internet Explorer.
I'm trying to use the application now on a Samsung SGH-F700W which uses a web browser called NetFront 3.3 (this is being supplied by Vodafone in the UK as their answer to the iPhone).
On several pages within the application I get the following error message:
"Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machine key> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster."
To save time, let me tell you some of the things I am aware of/have tried so far:
1. I am not using a web farm or cluster.
2. The application works find with Pocket PC.
3. I am aware that some mobile browsers limit the size of hidden fields and this may be screwing up the viewstate field. To this end, I have overridden the PageStatePersister property in my mobile forms, and am using the SessionStatePersister. This has not resolved the problem.
4. I have tried adding:
<pages enableEventValidation="false" viewStateEncryptionMode ="Never" />
to my web.config file (although I am aware this is not recommended). This also does not solve the problem.
5. The browser does appear to be capable of supporting hidden fields, as I can see other hidden fields in the posted data.
Any ideas?
A more general question for those of you with more experience of a variety of mobile devices. Does anyone have an opinion on the use of viewstate in mobile applications that use Microsofts Mobile Controls? Is it just a bad idea? I would only have to support devices with an actual web browser that supports HTML, not mobile phones.
Thanks for any suggestions given!
Kind Regards
James