Creating an IIS website

Note

Be aware of the following when hosting the Web APIs under IIS:

  1. Do not place the PowerServer Web APIs to the same website where the client app is placed (they should be placed to different websites, or placed to different servers).

  2. Do not use any website that is already hosting applications or pages for hosting the Web APIs. It is highly recommended that you create a new site for hosting the Web APIs and make sure the site contains the Web APIs only (no any other apps or pages). If you want to host the client app and the Web APIs under the same IIS, then create two sites (one for hosting the client app and the other for hosting the Web APIs).

  3. If you have multiple Web APIs, you can deploy each Web APIs to a separate website or deploy multiple Web APIs to different sub-folders of the same website.

    For new users or for those who are setting up a test or development environment, deploying each Web APIs to a separate website is recommended, because it is easier to configure and succeed.

    For experienced users or for those who are setting up a production environment, deploying multiple Web APIs to different sub-folders of the same website is recommended, because it is easier to manage multiple Web APIs, but you will have to convert the sub-folder to an IIS sub-application (see Deploying multiple Web APIs to IIS).

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

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

  • Site name: testsite in this example

  • Physical path: C:\inetpub\testsite_root in this example. This is where the folders and files of Web APIs will be published.

  • Port: 81 in this example.


The IIS website is created and started.


Open a Web browser and run the following URLs to verify the new website.

http://localhost:81/

http://your_server_ip:81/

If the IIS page displays (it is normal that the page displays the server error: 403 - Forbidden), the website is ready to use.