Setting up the local IIS server

Creating a new web site

In this scenario, we will deploy the PowerServer Web APIs to the local IIS (so PowerServer Web APIs will run on IIS, instead of the built-in Kestrel); and we will reuse the local IIS in Guide 1 as well as the client app that is deployed to the local IIS in Guide 1 (so there is no need to generate and deploy the client app again).

But notice that, using the same IIS for the client app and the PowerServer Web APIs does NOT mean hosting them in the same web site; instead, we should always place the client app and the PowerServer Web APIs in different web sites. Therefore, we will continue using the default web site (port number: 80, physical path: C:\inetpub\wwwroot) to host the client app and will create a new independent web site (using different port number and different physical path) for the PowerServer Web APIs.

To create a new web site for PowerServer Web APIs:

Step 1: In IIS Manager, open the server's node in the Connections panel, right-click the Sites folder, and then select Add Website.


Step 2: Specify the following settings and then click OK to create the web site.

You can use other values you like, but remember them (especially the physical path and the port number) as they will be used later.

  • Site name: webapi in this example

  • Physical path: C:\inetpub\webapi in this example. Remember this path as you will copy the published Web APIs to this path later. Make sure this is an empty folder and contains no other sub-folders or files.

  • Port: 81 in this example. Remember this port number as you will use it to access the PowerServer Web APIs (for example, http://localhost:81/) and the health-ui page (for example, http://localhost:81/health-ui/). Make sure the port number is not occupied by another program. For how to verify if a port number is occupied, follow the instructions in Choosing an appropriate port number.


The IIS web site is created and started.


Verifying the IIS web site

Open a Web browser and run the URL of the new web site to verify that it is working correctly.

http://localhost:[port]/, for example, http://localhost:81/

You should be able to see the page displaying server error: 403 - Forbidden. This is normal behavior.


Now the new IIS web site is ready to host the PowerServer Web APIs. After you copy the Web APIs to the physical path of this site later, you should be able to access the Web APIs via http://localhost:[port]/.

Installing ASP.NET Core Hosting Bundle

Download and install ASP.NET Core Hosting Bundle 3.1.

This component is required if you want the IIS process manager to automatically launch the PowerServer Web APIs deployed to the IIS web site.