206

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)?

4

3 Answers 3

385

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.

Sign up to request clarification or add additional context in comments.

6 Comments

Thanks. I suspected as much, though unclear why the async calls are failing. I'll put that in a different question.
I have a 4.5 application pool in IIS after installing Visual Studio 2012 and 4.5, and Windows 8
Yes the Apppool has the name ".NET v4.5" but check the .NET Framework version column in IIS - Application pools screen, it will be 4.0. (There are 3 base CLR: 1.0, 2.0, 4.0.)
What's going on here? I do not have 4.5 listed as a framework version yet this SO QA says there's a new CLR, contrary to Peter stackoverflow.com/questions/8810391/…
msdn.microsoft.com/en-us/library/bb822049(v=vs.110).aspx - Features and IDE section; it's not a new CLR
|
36

Go to "Run" and execute this:

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

NOTE: run as administrator.

2 Comments

just wanted to say thanks, so happy I finally found this solution
My App reminds me of not finding .net Framework 4.5 when I try to run it with VS 2015. After execute this command, it works like a charm. Thank you. Remember run as Administrator on CMD.
19

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

2 Comments

When installing IIS before installing ASP.Net 4.5 or 4.0 you can face a missing registration in the metabase. Using aspnet_regiis can help reset IIS serverwide, but note that it will upgrade all application pools to the selected version.
The appcmd does change the app pool to 4.5 and you can see that in iisadmin. But then you can't debug from devstudio 2022. Says it can start the server.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.