I’ve currently got a ASP.NET MVC 2 application on .NET 3.5 and I want to migrate it over to the new .NET 4.0 with Visual Studio 2010.
Reason being that it’s always good to stay on top of these things – plus I really like the new automatic encoding with <%: %> and clean web.config 🙂
So, does anyone have any experience they could share? Looking for gotchas and the likes.
I guess this could also apply to any ASP.NET Forms projects aswell.
TIA,
Charles
Gotcha #1 – Changes application pool
If your ASP.NET project is setup to use IIS and not Cassini, during the upgrade to .NET 4.0 process it’ll automatically change the application pool that your site uses to the new ASP.NET v4.0 application pool. This may have an effect on permissions if you are using the application pool identity for anonymous authentication.
Gotcha #2 –
[ValidateInput(false)]stops workingThis is a breaking change in ASP.NET 4.0. A related question can be found here.
The jist is that you must add
<httpRuntime requestValidationMode="2.0" />into your web.config.