1. Kevin Ridley
  2. PowerServer
  3. Thursday, 24 March 2022 19:38 PM UTC

We have a PS2021 that works great on localhost, so we tried deploying it to a Win2019 / IIS server.  Initially the client deployment went great and we got the launcher and it downloaded a shortcut to the desktop, but it didn't work because the Server APIs weren't deployed.  Finally got the server apis deployed, but now we get a 500 error when we put in the website URL. 

Accepted Answer
Marco Meoni Accepted Answer Pending Moderation
  1. Wednesday, 13 April 2022 13:49 PM UTC
  2. PowerServer
  3. # Permalink

Hi Kevin,

out of curiosity, what fixed the 2 errors in your setup:

- 500: you said re-installation of .NETCore hosting bundle made the trick right?

- 404: ?

Thanks,

.m

Comment
  1. Julie Jiang @Appeon
  2. Monday, 18 April 2022 01:15 AM UTC
Hi Kevin,

I wonder why we need 3 sites. What are the difference between the "client website" and "for the FTP"? Seems to me they are both the web server site?

Best regards, Julie
  1. Helpful
  1. Kevin Ridley
  2. Monday, 18 April 2022 23:32 PM UTC
FTP site is strictly FTP for use if we deploy the client directly from PB instead of creating the zip file and copying that to the server and expanding. We've had more luck using the zip file, so we really don't need the FTP site. If we deploy to a zip file, we only need 2 sites, 1 for the client and 1 for the APIs.
  1. Helpful
  1. Marco Meoni
  2. Tuesday, 19 April 2022 20:28 PM UTC
FYI, I got this solved with a domain policy that makes Applocker/Antivirus to trust EXEs digitally signed with company code signing certificate.

Cheers,

.m
  1. Helpful 2
There are no comments made yet.
Logan Liu Accepted Answer Pending Moderation
  1. Friday, 1 April 2022 02:16 AM UTC
  2. PowerServer
  3. # 1

Hi Kevin

Have you installed .NET Core Hosting Bundle? Not not, you may see this error.  Please refer to:

https://docs.microsoft.com/en-us/aspnet/core/test/troubleshoot-azure-iis?view=aspnetcore-3.1#500-internal-server-error

https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/?view=aspnetcore-3.1#install-the-net-core-hosting-bundle

Regards,  Logan

Comment
  1. Kevin Ridley
  2. Monday, 4 April 2022 14:44 PM UTC
Was finally able to reinstall. Re-deployed the app and APIs and now getting a 404.
  1. Helpful
  1. Logan Liu
  2. Wednesday, 6 April 2022 03:03 AM UTC
Which request gets a 404? Did the PowerServer API project deploy successfully?

For how to deploy the PowerServer project, you can also refer to this tutorial:

https://docs.appeon.com/ps2021/Deploying_your_PowerServer_project_to_remote_servers.html

Regards, Logan
  1. Helpful
  1. Kevin Ridley
  2. Wednesday, 6 April 2022 13:24 PM UTC
Yes I've been through that tutorial and yes the API deployed successfully. I published from SnapDevelop and it completed successfully.
  1. Helpful
There are no comments made yet.
Marco Meoni Accepted Answer Pending Moderation
  1. Wednesday, 30 March 2022 06:57 AM UTC
  2. PowerServer
  3. # 2

Hi Kevin,

1) can you access IIS welcome page at http://yourserver:80? 

2) if so, what port have you deployed PS API to? See PS project -> Web API -> Web API URL
Say it is 81. 
Can you reach IIS on that port

> telnet yourserver 81

You may need to add it to myserver's firewall rules.

3) If 2) also works, you can quickly check if PS is up and running by calling one of its APIs:

http://yourserver:81/api/session/getsessioncount

Best,

.m

Comment
  1. Marco Meoni
  2. Friday, 1 April 2022 21:26 PM UTC
Hi Kevin,

any progress?

How are you publishing ServerAPI?

- from dev machine via webdeploy (i.e. remote IIS Mgmt service installed and port 8172 accessible) ?

- directly on the server via file system ?



Since ServerAPI is published to dedicated website on port 5009 you should be able to connect



yourserver:5009/api/session/getsessioncount



Alternatively you can also try to access the health status page provided by PS (https://docs.appeon.com/ps2021/Check_the_status_of_Web_APIs.html):



yourserver:5009/health-ui



Regarding web.config mentioned in your error message, I checked on my side and it looks rather standard:





<configuration>



<system.webServer>

<handlers>

<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />

</handlers>

<aspNetCore processPath="dotnet" arguments=".\ServerAPIs.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" />

</system.webServer>

</location>

</configuration>



HTH,

.m

  1. Helpful
  1. Kevin Ridley
  2. Monday, 4 April 2022 15:06 PM UTC
How are you publishing ServerAPI?

Directly from SnapDev Publish



yourserver:5009/health-ui

Not working



yourserver:5009/api/session/getsessioncount

Not working

  1. Helpful
  1. Kevin Ridley
  2. Monday, 4 April 2022 15:08 PM UTC
I rechecked and I did have the port opened in Windows Defender Firewall. I have an inbound rule for ports - "81, 5009, 8172"
  1. Helpful
There are no comments made yet.
Francisco Martinez @Appeon Accepted Answer Pending Moderation
  1. Thursday, 24 March 2022 19:58 PM UTC
  2. PowerServer
  3. # 3

Hi Kevin,

You might want to check IIS' logs to see if they offer any helpful information. The logs are located on (I'm quoting here)

On a standard Windows Server, IIS log files are found at %SystemDrive%\inetpub\logs\LogFiles by default.

Please let us know if the HTTP 500 error shows up in the logs and what they contain.

Regards,
Francisco

Comment
There are no comments made yet.
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Thursday, 24 March 2022 19:43 PM UTC
  2. PowerServer
  3. # 4

Are the server APIs hosted on a different port from the client app?  Some times we have seen there is conflict between regular .NET framework and the .NET core framework that the server APIs uses.  So by separating you can avoid that issue.

Also, when you compiled the server APIs, did you have the compile settings as follows?  If for example, you are compiling for wrong .NET Core version or wrong bitness (i.e. defaults to x86 change to x64) that could cause such 500 error.

 

Comment
  1. Kevin Ridley
  2. Monday, 28 March 2022 19:35 PM UTC
Are you talking about the Edit Bindings on the website? We currently have http, all unassigned, 81, * for the entries. For hostname, we've tried the name of the server and also manually put in the ip address. I feel like we're missing something, but don't know what it is. My understanding is when you're on the server it would be localhost.
  1. Helpful
  1. Armeen Mazda @Appeon
  2. Monday, 28 March 2022 19:38 PM UTC
Yes, on the server you should be able to use localhost. This is not PowerServer product config so we may be limited help. I think best to ask on IIS forums for help.
  1. Helpful
  1. Kevin Ridley
  2. Tuesday, 5 April 2022 18:06 PM UTC
Update: we repaired the .NET Core Hosting and IIS and started from scratch. We are still getting a 404 - "No webpage was found for the web address http://myserver/mysite . If I just pull up the server:80 the IIS welcome page opens fine. We had an IIS website expert look at it and he said bindings and IIS is fine, there's something wrong in our deploy. We've tried deploying from the PS project in PB and also deploying to a file and copying that to the server and extracting. I'm going to open a support ticket.

  1. Helpful
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.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.