Deploying a .NET 4.5 Web Application Using Web Deployment

I have an ASP.NET MVC 3 application. The project is built using VS 2010 and is designed for .NET 4.0. Now I redirected it to .NET 4.5 and successfully recompiled. Attempting to deploy it to our test server (Windows 2008 R2 SP1) now fails:

Error code: ERROR_APPPOOL_VERSION_MISMATCH Additional information: the application pool that you are trying to use has the property "managedRuntimeVersion" set to "v4.0". This application requires "v4.5". More details: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_APPPOOL_VERSION_MISMATCH .

.NET 4.5 is installed on the server, but there is no 4.5 application pool (because it is updated on the spot and, as I understand it, the 4.0 pool should be fine). The client machine has VS 2012, and therefore Web Deploy 3 (formerly Web Deploy 2). I also installed Web Deploy 3 on the server.

I tried re-registering ASP.NET with aspnet_regiis - no luck.

Why can I get an error and how to fix it? This is so frustrating ...

ps Found a similar question about RC, but it doesn't help

Update:

This seems like a mistake. Microsoft did not fix with CTP. IgnoreDeployManagedRuntimeVersion property did the trick. What a disgrace!

+8
webdeploy msdeploy
source share
4 answers

Windows Server 2012 includes .NET 4.5 by default and (when adding the web server role) IIS has the following application pools: DefaultAppPool, .NET v4.5, .NET v4.5 Classic, which use the .NET Framework 4.0 (because 4.5 is updated in place 4.0). However, if we install .NET 4.5, which is distributed on Windows Server 2008 with .NET 4.0 installed, the pools are not renamed: ASP.NET v4.0, ASP.NET v4.0 Classic. And this is the key that caused web deployment to fail.

+5
source share

You can try adding this property to the project:

 <IgnoreDeployManagedRuntimeVersion>True</IgnoreDeployManagedRuntimeVersion> 
+9
source share

@kzu: don't try, it will work.

There was the same problem when installing Orchard CMS. Keep targeting v2.0. But find a simple solution: in IIS, in the application pools (a list with all application pools) you can find the second upper right list of settings: "Set application pool settings ...", there by default from 2.0 to 4.0 et, voila.

+2
source share

Register ASP.NET for IIS
but. Run CMD as Administrator
b. CD in \ windows \ microsoft.net \ framework \ v4.x
from. Aspnet regiis -i

+1
source share

All Articles