Publishing Web APIs to IIS

The following uses the Web Deploy method to publish Web APIs to IIS:

Step 1: On the development machine, open the PowerServer C# solution in SnapDevelop. Log in to SnapDevelop if required.

Click the Open C# Solution in SnapDevelop button () in the toolbar to launch the PowerServer C# solution in SnapDevelop. Or go to the location where the PowerServer C# solution is generated; and double click PowerServer_[appname].sln to launch the solution in SnapDevelop.

At startup, the solution will install/update the dependencies. Wait until the Dependencies folder completes the install/update. (Make sure the machine can connect to the NuGet site: https://www.nuget.org in order to successfully install PowerServer NuGet packages).

Step 2: In the Solution Explorer, right click on the ServerAPIs project node, and select Publish.

Step 3: In the window that appears, select Web Deploy, and click Start.

Step 4: Configure the Web deploy profile, and click Next.

The following figure shows the settings for deploying to an IIS website on a remote server.

Note: Input the Windows user name that you have configured to allow to connect to the site.


The following figure shows the settings for deploying to an IIS website on the local machine.

It is not necessary to input username and password when connecting to a local site.


Step 5: Keep the others as default settings and click Finish.


Publishing begins automatically. If any error or failure is reported in the Output window, click the link provided at the end to view more details and possible solutions.

Step 6: Make sure publishing was successful as shown in the figure below.

After that you can specify the URL (for example, http://172.16.100.83:81) as the Web API URL in the Web APIs tab of the PowerServer project painter and then build and deploy the project again.

If you use the SQL Anywhere database or ASE database, also set up the corresponding ODBC data source in the server where Web APIs is published and running.


When you run the installable cloud application later, the following two processes will be started in the server and they will launch the PowerServer Web APIs automatically.