1. George Mikhailovsky
  2. PowerServer
  3. Tuesday, 3 May 2022 21:54 PM UTC

I deployed my PB 2021 app using PowerServer Project on my local IIS server and then remotely without any issue. I then started deploying the second PB 2021 application locally, repeating the same steps as for the first app. When I completed the whole process and tried to run the second app in the browser, I got an error: "HTTP Error 500.32 - Failed to load .NET Core host." When I deleted the folders with the second app, CloudAppPublisher and web_apis from wwwroot and deleted the app and web_apis sites and Application Pools from IIS and restored all those folders and sites for the 1st app, everything works fine.

Does anyone know how to deploy a second PB application on the same IIS server? Specifically, should I deploy only the new app folder and leave the CloudAppPublisher and web_apis created for the first app as they are? Or do I need to copy these two folders for the second application to wwwroot by renaming them somehow? If so, how can I link these two folders to the proper application?

I would really appreciate answers to my questions or any additional instructions for deploying the 2nd PowerServer project,

George

 

 

Accepted Answer
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Thursday, 5 May 2022 18:28 PM UTC
  2. PowerServer
  3. # Permalink
Glad to hear that!
Comment
There are no comments made yet.
George Mikhailovsky Accepted Answer Pending Moderation
  1. Thursday, 5 May 2022 18:13 PM UTC
  2. PowerServer
  3. # 1

Dear Armin, Chris and Logan,

Thanks to Logan Louie's suggestion, I solved my problem and I can run both applications in my development environment without problems.

I am very grateful to all of you for your suggestions and for your willingness to help me. You are truly a great team!

George

 

Comment
There are no comments made yet.
George Mikhailovsky Accepted Answer Pending Moderation
  1. Wednesday, 4 May 2022 19:54 PM UTC
  2. PowerServer
  3. # 2

Hi Armeen and Chris,

Thank you a lot for your replies. I looked through all the help file opened by Armeen's 1st link. As far as I understood, it doesn't relate to the deployment on localhost and my local IIS.

Then, according issues 2 in Armeen's comment, I tried to change Web API URL on Web APIs Tab of PowerServer Project from default (localhost:5000) that I used for my 1st app to localhost:84/cpms_pr (1st screenshot in the attached file). Unfortunately, compiling and running Web APIs after this gave error (2nd screenshot). Everything is OK relating the 3rd issue in the Armeen's comment.

I checked everything, according Chris' recommendations, and everything looks fine. I confirm that CAL created for the 2nd app works fine with the 1st one. However, when I tried to use Web APIs of the 1st app for the 2nd one, I got error (3rd screenshot). And when I republished Web API for 2nd app to a new separate folder, copied all the folders and files in it to new web_api folder in wwwroot, and created new web_api site with port 84 (web_apis for the 1st app has port 82), I got the error again (4th screenshot). http://localhost:84/health gives "HTTP Error 500.32 - Failed to load .NET Core host." http://localhost:82/health, at the same time, returns "Unhealthy" message as it should. And finally, "dotnet CustomizaDeploy.dll -url" command shows correct urls for both application.

Do you have any other suggestions? I would be very appreciated,

George

Attachments (1)
Comment
  1. George Mikhailovsky
  2. Thursday, 5 May 2022 03:15 AM UTC
I redeployed and republished Web API, and DOS console appears now with standard info without errors. Unfortunately, "http://localhost:84/health" still does not respond. Tomorrow I will try to recreate PowerServer from scratch. Thank you for your help, George
  1. Helpful
  1. Logan Liu @Appeon
  2. Thursday, 5 May 2022 16:34 PM UTC
Hi George,

For HTTP Error 500.32, please verify the Publishing Settings for the PowerServer Web API project. In my test environment, if the Deployment Mode is Self-Contained, and the Target Runtime is win-x86, but the IIS worker process is running as a 64-bit app, then you will see this error.

Refer to: https://docs.microsoft.com/en-us/aspnet/core/test/troubleshoot-azure-iis?view=aspnetcore-3.1#50032-ancm-failed-to-load-dll



Please republish the Web API for the same processor architecture as the IIS worker process, or publish the Web API as a framework-dependent deployment.

Regards, Logan
  1. Helpful 1
  1. George Mikhailovsky
  2. Thursday, 5 May 2022 17:00 PM UTC
Thank you Logan,

I am in the meeting now but I will try win-x64 in about an hours.

Best regards,

George

  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 3 May 2022 23:16 PM UTC
  2. PowerServer
  3. # 3

Hi George;

  You only need to deploy the CAL once unless, you change PB versions or apply an MR (aka new build).

  If you created the 2nd App's Cloud app project by copying the 1st Apps project. Then make sure on the General Tab & the Web API tab that you specified a different App Name & a different C# deployment (repository) name.

  Also, make sure that your App deployment names have no spaces or periods in the name.

HTH

Regards ... Chris

Comment
There are no comments made yet.
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 3 May 2022 23:15 PM UTC
  2. PowerServer
  3. # 4

Hi George, There are 3 key things you need to do.

1. Host the Web APIs on its own IIS Website that is separate from the IIS Website that hosts the client app.  IIS allows you to create multiple websites in a single server.  Here are instructions to setup the Web APIs on its own dedicated website and how to properly compile the Web APIs for such deployments: https://docs.appeon.com/ps2021/Hosting_Web_APIs_in_IIS.html

2. Since you have more than one app, save each app’s Web API files is in its own subfolder in IIS.  This means each app in PB IDE on Web API tab config should have a URL like https://www.company.com:port/app1, app2, etc.  Or you can adjust the URL after compilation by following these instructions: https://docs.appeon.com/ps2021/Change_Web_API_URL.html

3. Lastly, make sure the port # you set in IIS for the Web APIs is not being used by some other process and that the firewall allows HTTP traffic to that port #.

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.