Learn MS NET | Setting up IIS to run .NET Core Applications

Our journey learning how to write .NET

Learn MS NET

  • Join Us on Facebook!
  • Follow Us on Twitter!
  • LinkedIn
  • Subcribe to Our RSS Feed

Setting up IIS to run .NET Core Applications

As I’m getting another IIS Server ready to run a .NET Core Web Application I thought I would document the process so that if someone else wants to get their IIS server configured and serving they can follow along.

First off there are lots of options for setting up a .NET Core application, we will not get into those options today they may become another post at a later time.

Supported systems

The following operating systems are supported for running with IIS:

  • Windows 7 or later
  • Windows Server 2008 R2 or later

IIS Configuration

Windows Server Operating Systems

Enable the Web Server (IIS) server role and establish role services, if this has not been done already.

  1. Use the Add Roles and Features wizard from the Manage menu or the link in Server Manager. On the Server Roles step, select the checkbox next to Web Server (IIS).Step1
  2. After adding the Web Server, select the desired role services or accept the default services provided.Step2
  3. Continue on to install the web server role and services.  A server reboot is not required after installation.

At some time in the future I will try to update this and include the steps for Windows as well as Windows Server

Install the .NET Core Hosting Bundle

The .NET Core Hosting Bundle installs the .NET Core Runtime, .NET Core Library and the ASP.NET Core Module. This module allows ASP.NET Core applictions to run behind IIS. Of concern is to remember that installation of the Microsoft Visual C++ 2015 Redistributable is necessary before installing the .NET Core Hosting Bundle.

One thing to remember is if the Hosting Bundle is installed before IIS, it must be repaired. Run the installer again after installing IIS.

Download (current version)

Obtain the latest installer by following this link:

Latest .NET Core Hosting Bundle installer

Install the Hosting Bundle

  1. Run the installer on the server that was downloaded. There are some switches that can be used on the installer to customize how the installation occurs. At a later time I will add them to this post.
  2. Restart the systems or execute net stop was /y followed by net start w3svc from a command prompt or PowerShell as an administrator. Restarting IIS allows the service to pick up an environment variable that is added by the installer.

If the installer detects that IIS requires a reset in order to complete the installation, IIS will be reset. If the installer triggers a reset, all of the app pools and websites are restarted.

In the future I will add some more details to this walkthrough as well, just wanted to document this and have it available when I needed to do this again.

Comments are closed