ASP.NET 4 – Breaking Changes and Stuff to be Aware of

If you’re getting started with ASP.NET 4, there’s a few things you might run into that could throw you for a loop if you didn’t expect them. Remember that while ASP.NET is a very compatible release, it is also a side-by side release so this was a good time to make breaking changes for the better.

Note that just installing ASP.NET 4 won’t break your applications. You can happily run all your ASP.NET applications side by side each in their own AppPool. These first two “gotchas” below are if you’re moving an existing application over to .NET 4. The third gotcha is an install ordering thing.

Request Validation is more strict by default.

Request validation is more strict by default in ASP.NET 4. Pretty much anyone moving a non-trivial ASP.NET 2 application over to ASP.NET 4 has a good likelihood of running into this. The workaround is pretty simple. If you want to revert the behavior of the validator to pre-ASP.NET 4, add this to your web.config:

That’s it. Of course, you can always dig in a bit and see why your app doesn’t like the stricter validation and fix that as well.

via Scott Hanselman

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: