204
votes

I installed the Visual Studio 11 Beta and suddenly all the async action methods I had created under the VS 11 Developer preview started hanging (apparently this issue: http://blogs.msdn.com/b/pfxteam/archive/2012/03/03/10277166.aspx).

My app is using v4.0.30319 as the Framework Version, but there is no option to use 4.5. I repaired my .net 4.5 install to be sure, but nothing. Is there a way to configure this in IIS? Do I need to bin deploy the files (and if so which)?

3
Link to .Net 4.5 install for servers, in case anyone lands here looking for it: microsoft.com/en-us/download/details.aspx?id=30653 - Chris Moschini
Offline .NET Framework 4.5.1 installer: microsoft.com/en-us/download/details.aspx?id=40779 - Peter Kiss
.NET 4 and .NET 4.5 (including 4.5.1 and 4.5.2) are on the CLR version 4.0 >>> More detail: msdn.microsoft.com/en-us/library/8bs2ecf4(v=vs.110).aspx - VnDevil

3 Answers

384
votes

There is no 4.5 application pool. You can use any 4.5 application in 4.0 app pool. The .NET 4.5 is "just" an in-place-update not a major new version.

35
votes

Go to "Run" and execute this:

%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -ir

NOTE: run as administrator.

19
votes

There is no v4.5 shown in the gui, and typically you don't need to manually specify v4.5 since it's an in-place update. However, you can set it explicitly with appcmd like this:

appcmd set apppool /apppool.name: [App Pool Name] /managedRuntimeVersion:v4.5

Appcmd is located in %windir%\System32\inetsrv. This helped me to fix an issue with Web Deploy, where it was throwing an ERROR_APPPOOL_VERSION_MISMATCH error after upgrading from v4.0 to v4.5.

MS article on setting .Net version for App Pool