+4  A: 

according to this post:

http://bytes.com/topic/asp-net/answers/861764-invalid-viewstate-system-string-decryptstringwithiv

It seems that the problem is caused by the way browsers render pages differently when the doctype is not specified.

Here is another interesting post i found on this subject, still not the solution though:

http://blog.aproductofsociety.org/?p=11

on the above page it has "Response.Cache.SetNoStore()" as a possible solution in the comments, i'll try this next to see if it helps.

John Boker
Holy macaroni! I'd about given up on this one. I'm going to go try this out now. I'm voting it up now, but if this solves the problem, I'll be wishing I could vote this one up several times. Thanks, either way.
Beska
Argh. No dice. I suspect that this is probably the answer that works for some people, but we're still having the same issue...(though I expect the underlying cause might still be the same...)
Beska
Yeah, we're still having this issue here too, this is something interesting i found http://blog.aproductofsociety.org/?p=11
John Boker
Bleh. Well, since I'm getting *nothing* on this so far, you might end up with the 200 rep by default!
Beska
If you would, would you go to https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=434997, and rate it highly so that we have an improved chance of getting this issue resolved?
Beska
Hmm...I'm beginning to think that the bounty system has a big flaw...you're going to get the bounty, which is fine, of course...but it's also going to mark this answer as "accepted" which implies that it solved the problem (and, although it's been very useful, it doesn't actually solve the problem.) Seems like a flaw.
Beska
Voted up the connect.microsoft.com thing, i hope an answer to this can be found.
John Boker
Are you getting this problem in non-IE 8 situations? The more I look at this (especially considering the leads you've provided), the more I'm thinking that this is related to the way IE 8 is parsing the stream, rather than what is being returned by .NET and the web server. Have you seen this in anything other than IE 8? (I've seen an IE 7, though I'm not sure if it wasn't IE 8 in "compatibility" mode).
Beska
@beska, you're right in that it seems more like an IE8 problem and we have seen it on IE7 too, not on firefox or safari though... maybe it is an IE8 issue and we can leave it at that?
John Boker
Hmm. I'd like to do that...but IE 8 is probably going to be here for a while...and telling users "hey, it's not my fault, it's IE!"...true enough, but they don't care. They just want it to work. *sigh*.
Beska
maybe IE8 will be fixed with a service pack and the issue will be solved.
John Boker
Now *that* would be good.Have you checked how much data is missing? I was looking at someone else that posted about this and he was claiming that he was missing either 1k or 4k of data. So I checked a sample of mine, and sure enough, I was missing exactly 4096 bytes. Not sure what I can do with this information yet...but it's an interesting clue.
Beska
I have checked and I also see exactly 4096 bytes of data missing when this exception occurs. The few times we have been able to replicate this in house it is always using IE8. Sometimes it is in IE7 compatibility mode, sometimes not.
Jim Petkus
A: 

I am having the same problem. did you find a solution. buggin the crap out of me!!!

Sadly, no. I'm the same guy that asked about it on the ASP.NET forums as well, that you just commented on on Saturday. I'm hoping for the best, but am getting no real responses.
Beska
If you would, would you go to https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=434997, and rate it highly so that we have an improved chance of getting this issue resolved?
Beska
Have you gotten this error from a user using anything other than IE 8?
Beska
+1  A: 

What version of .NET are you compiling against? What happens if you change your build to build for an older or newer version? (not sure if this would do anything but it's worth a try)

If it's still happening, I think you should post a bug about it on Microsoft Connect. They should come back to you pretty quickly.

Mladen Mihajlovic
Changing the .NET version: sadly, that's not an option for us...Microsoft Connect: I'll give it a shot!
Beska
I've gotten a response that they (Microsoft Connect) are looking into the issue...hopefully they won't just say "we can't reproduce it" and close it.
Beska
Cool. I've voted for it too. Good luck :)
Mladen Mihajlovic
+1  A: 

Have you got any HttpHandlers or Modules that are registered in the web config that modify the rendered HTML before it's sent to the user?

These can often be:

  • Minifiying JS and CSS
  • Ensure HTML is valid

Might be worth a look.

Zhaph - Ben Duguid
Good thought, but I'm 95% sure the answer is no. But I'll definitely ask around to double check.
Beska
A: 

Having the same problem here http://forums.asp.net/p/1373410/3100520.aspx#3100520

+2  A: 

I am from the ASP.NET team -- we are looking for a customer willing to work with us on researching this issue. If anyone is able to reliably reproduce the problem by requesting their own pages and checking the logs, and is willing to work with our support group, please respond or send me a direct message. Thanks!

InfinitiesLoop
This was written some time ago, and after considerably more investigation and corroboration with other people having the same issue, it looks like this is, in fact, an IE 8.0 issue. Still, I think I speak for everyone when we say we'd love someone directly involved to give this a look. Is there any good way to bring this issue to the attention of the IE 8 team? The Microsoft Connect forum for IE seems to be closed, and no other obvious avenues come to mind.
Beska
Yes, a good way is to contact me if you are able to provide any repro. The fact I'm from the ASP.NET team doesn't mean the IE8 team isn't involved -- we are using whatever resources we can to figure it out, including IE folks.This connect bug is also a good place to add information:https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=434997
InfinitiesLoop
+5  A: 

Microsoft has responded to this issue:

Note is a bug in Internet Explorer 8. The Internet Explorer team has been investigating this issue.

-=Impact=- Thus far, we believe the problem has no impact on the end-user's experience with the web application; the only negative effect is the spurious/malformed requests sent by the JavaScript speculative-download engine. When the script is actually needed by the parser, it will properly be downloaded and used at that time.

-=Circumstances=- The spurious-request appears to occur only in certain timing situations, only when a META HTTP-EQUIV tag containing a Content-Type with a CHARSET directive appears in the document, and only when a JavaScript SRC URL spans the 4096th byte of the HTTP response body.

-=Workaround=- Hence, we currently believe this issue can be mitigated by declaring the CHARSET of the page using the HTTP Content-Type header rather than specifying it within the page.

So, rather than putting

[META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"]

In your head tag, instead, send the following HTTP response header:

Content-Type: text/html; charset=utf-8

Note that specification of the charset in the HTTP header results in improved performance in all browsers, because the browser's parsers need not restart parsing from the beginning upon encountering the character set declaration. Furthermore, using the HTTP header helps mitigate certain XSS attack vectors.

NOTE: There have been reports that this problem still happens when the META HTTP-EQUIV is not on the page. We will update this comment when we have more investigation. Posted by Microsoft on 6/30/2009 at 12:25 PM

Jim Petkus
A: 
NHenriques