How to set .net Framework 4.5 version in IIS 7 application pool

351,873

Solution 1

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.

Solution 2

Go to "Run" and execute this:

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

NOTE: run as administrator.

Solution 3

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

Share:
351,873

Related videos on Youtube

TheIdesOfMark
Author by

TheIdesOfMark

Updated on July 10, 2022

Comments

  • TheIdesOfMark
    TheIdesOfMark almost 2 years

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

  • TheIdesOfMark
    TheIdesOfMark over 12 years
    Thanks. I suspected as much, though unclear why the async calls are failing. I'll put that in a different question.
  • Brian Mains
    Brian Mains over 11 years
    I have a 4.5 application pool in IIS after installing Visual Studio 2012 and 4.5, and Windows 8
  • Peter Kiss
    Peter Kiss over 11 years
    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.)
  • Luke Puplett
    Luke Puplett over 10 years
    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/…
  • Peter Kiss
    Peter Kiss over 10 years
    msdn.microsoft.com/en-us/library/bb822049(v=vs.110).aspx - Features and IDE section; it's not a new CLR
  • bumble_bee_tuna
    bumble_bee_tuna over 10 years
    @Microsoft Cause thats not at all confusing !
  • Jan Hebnes
    Jan Hebnes almost 9 years
    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.
  • Jordan Wayne Crabb
    Jordan Wayne Crabb over 8 years
    just wanted to say thanks, so happy I finally found this solution
  • Nijat2018
    Nijat2018 almost 8 years
    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.