472,096 Members | 2,226 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,096 software developers and data experts.

.net Viewstate and mobile applications problem

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

Mar 18 '08 #1
0 2114

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by Richard Kasperowski | last post: by
9 posts views Thread by John Kirksey | last post: by
reply views Thread by ASMJ | last post: by
5 posts views Thread by russell.lane | last post: by
6 posts views Thread by Marc | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.