The following error might occur when you run an installable cloud app: Session creation failed.
Error:
Cause:
The host name of the Web API does not match with the host name in the SSL server certificate. For example, if the server certificate is a self-signed certificate which works for "localhost" only, then you cannot use IP address or domain name in the Web API URL; you can only use "localhost" in the Web API URL.
Solution:
Make sure the host name of the Web API matches with the host name in the server certificate.
In the local development environment, if a self-signed certificate is used, you can change the Web API URL to use "localhost" instead of IP address or domain name; or if you want to use IP address or domain name, you can consider selecting the Ignore PowerServer Certificate option to ignore the error. For more, refer to Support HTTPS.
In the production environment, you should create a trusted CA signed certificate (instead of using a self-signed certificate).
Error 1:
Cause:
-
The Web APIs has not been deployed to specified website or the Web APIs has not started.
Solution: Make sure the Web APIs has been deployed and started.
Take the URL in the above error as an example, you can input http://localhost:5001 to verify the Web APIs has been deployed and started. If you see a welcome page saying "Your ASP.NET Core application has been successfully started", then the Web APIs has been deployed and started, otherwise, you will have to deploy and start the Web APIs.
-
The Web APIs is not on the same server as the client app.
Solution: If the Web APIs is not on the same server as the client app, then you cannot use "localhost"; you should use the IP address or host name of the server hosting Web APIs.
Error 2:
Cause:
If the host server connects to Internet via a proxy server, then PowerServer Web APIs has to be configured with the proxy server as well.
Solution:
Open the PowerServer C# solution > the ServerAPIs project > the Server.json file, and configure the proxy server settings in the "ProxyOptions" block. The password for the proxy server (if any) must be an encrypted value (encrypted by the CustomizeDeploy.dll tool).
... "ProxyOptions": { "Server": "", "Username": "", "Password": "" }, ...
Publish the PowerServer Web APIs to the server.
Error:
Cause:
Two applications under the same IIS website cannot use the same application pool.
(It is not recommended to deploy more than one application to the same IIS website. You can follow Guide 2: Deploying to remote IIS and Guide 3: Deploying second app to remote IIS for the recommended best practise.)
Solution:
Step 1: Configure the two applications to use different application pools.
Step 2: Restart the website.