Enable .Net 4.5 in IIS on Windows 8.1

Setting up a new development box for myself I had forgotten all about the necessity to use the aspnet_regiis.exe –i  command. The information is fairly easily available, but with this post I’d like to cut away the fat and stick to a very easy how-to.

On my Windows 8.1 aspnet_regiis resulted in this message:

Microsoft (R) ASP.NET RegIIS version 4.0.30319.33440
Administration utility to install and uninstall ASP.NET on the local machine.
Copyright (C) Microsoft Corporation.  All rights reserved.
Start installing ASP.NET (4.0.30319.33440).
This option is not supported on this version of the operating system.  Administrators should instead install/uninstall ASP.NET 4.5 with IIS8 using the "Turn Windows Features On/Off" dialog,  the Server Manager management tool, or the dism.exe command line tool.  For more details please see
http://go.microsoft.com/fwlink/?LinkID=216771.
Finished installing ASP.NET (4.0.30319.33440).

Googling around a bit more turned up this link that explains how to go to the Windows Features (via appwiz.cpl) to activate .Net 4.5 on IIS:

image

Or to run this from an administrative prompt:

dism /online /enable-feature /all /featurename:IIS-ASPNET45

Please note the /all parameter which is not mentioned in the KB article, but necessary to automatically include all the necessary components.

UPDATE:

In order to get my webservices running I have spent more hours on struggling with the IIS beast. It appears that (according to this) you have to have to switch on yet another feature:

image

Or, if you want to automate all this, more dism commands:

dism /online /enable-Feature /all /FeatureName:WCF-HTTP-Activation

dism /online /enable-Feature /all /FeatureName:WCF-HTTP-Activation45

Advertisements

4 thoughts on “Enable .Net 4.5 in IIS on Windows 8.1

  1. Steve

    Thank you, thank you! That worked! I very much appreciate the time you spent to post this article. I’m sure you saved me plenty of time.

    The only other thing I needed to know to get everything working was to set the application pool’s Load User Profile property to False.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s