The fix: I put these two attributes in the <pages> element in your web.config file…
enableEventValidation=”false” viewStateEncryptionMode=”Never”
Found the solution here after much installing/reinstalling/updating/frustration/hassle/crying/thoughts-of-giving-up-on-web-development-and-becoming-a-security-guard-again:
http://siderite.blogspot.com/2007/08/aspnet-connection-to-server-has-been.html
Now here’s the interesting thing…I removed the two attributes and saved web.config to confirm the fix. My site still worked. So I did an iisreset to make doubly sure, and voila – the site broke again without those attributes. So, as is often the case when you’re trying to convince a laptop with Vista Home Premium that it’s actually a web server, beware false positives, false negatives and any other results you might get. Clear your browser cache and do an iisreset whenever you fiddle with this kind of stuff.
So why did this work? I managed to track down the spot where it was breaking, and it was inside a component that’s part of the third-party e-commerce suite we’re using. It was obviously trying to do some data access that SQL 2008’s components didn’t like. Why would the ASP.Net forms stuff affect it? Black Box hoodoo voodoo reasons, I guess. Was it the attributes that actually fixed the problem, or did my web.config just need to be fiddled with so the site would recompile in a certain way? Sadly, I am too busy to dig into that mystery.
edit: removed a space from the attributes.