1. Sim Joo Pee
  2. PowerServer
  3. Friday, 19 May 2023 02:28 AM UTC

Hi Sir,

 I am preparing two of my window 10 pc to become web server and net server. After i deploy(create package) client application and publish web api, it didnt work. I am quite fresh can you help me? Please see attachment for details error. Thank you.

Attachments (1)
Sim Joo Pee Accepted Answer Pending Moderation
  1. Friday, 19 May 2023 10:49 AM UTC
  2. PowerServer
  3. # 1

Hi All,

    I finally managed to setup the web server and .net server. Below is what i did. Please comment if it is not appropriate. Thanks you all for instant input/respond on my issue.

1) Added IIS_IUSRS group to grant accessing of c:\inetpub on web server and .net server

2) Setting Authentication -> Anonymous Authentication to   'Application pool identity' (Inside IIS manager)

3) Add MIME type json (Inside IIS manager)

 

Comment
  1. Tracy Huang @Appeon
  2. Tuesday, 23 May 2023 02:33 AM UTC
Glad to hear it is resolved, and thanks for the update!
  1. Helpful
  1. Miguel Leeuwe
  2. Tuesday, 23 May 2023 10:52 AM UTC
Thanks for sharing your solution SJP !
  1. Helpful
There are no comments made yet.
Logan Liu @Appeon Accepted Answer Pending Moderation
  1. Friday, 19 May 2023 09:33 AM UTC
  2. PowerServer
  3. # 2

Hi Sim,

I can see both your Web Server and .NET Server are not working as expected.

1) For the Web Server issue: if you are fresh about IIS setup, I suggest that you can only follow this tutorial step by step, it can make sure your IIS setup is correct.

I haven't ever encountered this Web Server error, but you can also refer to this article to learn more about this error: 5 Ways to fix Server Error in ‘/’ Application Runtime Error (windowsreport.com)

 

2) For the .NET Server issue:  '500 - Internal server error.'

We need to know more detail about this error. There is an easy way to write an IIS log file. Please find the web.Config file under the root of your Web API application site, change stdoutLogEnabled="false" to true, then check the logs at stdoutLogFile=".\logs\stdout". 

<configuration>
  <location path="." inheritInChildApplications="false">
    <system.webServer>
      <handlers>
        <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
      </handlers>
      <aspNetCore processPath=".\ServerAPIs.exe" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" />
    </system.webServer>
  </location>
</configuration>

Then restart the website and verify the Web API again: Verifying the Web APIs - - PowerServer 2022 Help (appeon.com)

Check the log file generated by IIS.

Alternatively, you can also enable PowerServer log, refer to: PowerServer logs - - PowerServer 2022 Help (appeon.com)

 

Regards, Logan

 

Comment
There are no comments made yet.
Marco Meoni Accepted Answer Pending Moderation
  1. Friday, 19 May 2023 08:15 AM UTC
  2. PowerServer
  3. # 3

Hi Sim,

Does c:\inetpub\webapi have IIS_IUSRS with full rights granted ? 

Cheers,

.m

Comment
  1. Sim Joo Pee
  2. Friday, 19 May 2023 09:21 AM UTC
I added, and before i reboot the pc, i tried, no luck. So, i rebooted the pc and tried, gladly it worked finally. THanks a lot. I luv u guys . BUT, now when i try to launch the client app http://[ip]/clientappname, it gave me error. See below.



Runtime Error

Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.



Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".



Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.
  1. Helpful
There are no comments made yet.
Tracy Huang @Appeon Accepted Answer Pending Moderation
  1. Friday, 19 May 2023 06:42 AM UTC
  2. PowerServer
  3. # 4

Also make sure ASP.NET Core hosting bundle (version 6.0 for PS 2022 and later, and version 3.1 for earlier PS versions) is installed on the server. This component is required by the IIS process manager to automatically launch the Web APIs. It is NOT installed by default.

Comment
There are no comments made yet.
Sim Joo Pee Accepted Answer Pending Moderation
  1. Friday, 19 May 2023 06:07 AM UTC
  2. PowerServer
  3. # 5

I had wrong IP set for the Net server. I just use the CustomizeDeploy.dll to change to correct URL+Port. But still giving error when trying to access http://[ip]:8889.  the error is  '500 - Internal server error.' Please help. thank you.

Comment
  1. Tracy Huang @Appeon
  2. Friday, 19 May 2023 07:17 AM UTC
Are you using PS 2021 or 2022? If you are using PS 2022, you would need to install hosting bundle 6.0. The version of hosting bundle should match with the version of .NET framework used by Web APIs.
  1. Helpful 1
  1. Sim Joo Pee
  2. Friday, 19 May 2023 07:41 AM UTC
Yes, i am 2022. I had installed 3 and 6 as well. Still no luck. I am running out of idea already.
  1. Helpful
  1. Tracy Huang @Appeon
  2. Friday, 19 May 2023 08:07 AM UTC
Before I reach out to the tech support engineer, please provide the following details:

1) when you run http://[ip_of_net_server]:8889, did you see the page saying that the ASP.NET core app is successfully started?

2) when you run http://[ip_of_web_server]/datatrak_cloud_kl, did you go through the process of downloading and installing launcher?

3) At what point did you get the error 500?

3) you can also test by using localhost instead of ip address in the local server to verify that it is not a firewall problem.
  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.