0

I'm writing a HttpPlatformHandler server app with C++ and Winsock functions. It works great on my development machine but when deployed on other machines it fails. I can run it separately and access it from the browser using the default port I coded into it on those other machines. Here are the error details:

Web Browser:

HTTP Error 502.3 Bad Gateway Error Code 0x80070057 There was a connection error while trying to route the request.

Event Viewer:

HttpPlatformHandler Process '0' failed to start. Port = 19516, Error Code = '-2147024809'.

Roland Smith
  • 957
  • 4
  • 7
  • If you download Microsoft Error Lookup Tool and ask it about `0x80070057`, you will see this error code means "the parameter is incorrect". Since you are building your own application server to hook to HttpPlatformHandler, you should carefully review the parameters you set in IIS XML configuration file, and whether they are valid for your own server process as input arguments. – Lex Li Jun 30 '22 at 20:22
  • Other typical errors you might come across are documented in https://halfblood.pro/running-nodejs-web-apps-on-iis-with-httpplatformhandler/ – Lex Li Jun 30 '22 at 20:23
  • I added code to write to a log file as the first lines of code in my program and I am getting nothing. Below is part of my web.config file from my laptop where it works. The non-working machine is identical except the path to the exe. – Roland Smith Jul 01 '22 at 01:15
  • Please learn how to edit a question to add key information and format it well. Never do that in a comment, which isn't readable at all. – Lex Li Jul 01 '22 at 01:36
  • I figured it out. I had the web.config file in a subfolder under C:\inetpub\wwwroot with the file in the URL. I moved it to C:\inetpub\wwwroot and now it works. – Roland Smith Jul 01 '22 at 02:38
  • If you found the solution, then you can post and accept it below as an answer. – Lex Li Jul 01 '22 at 04:02

1 Answers1

0

I figured it out. I had the web.config file in a subfolder under C:\inetpub\wwwroot with the file in the URL. I moved it to C:\inetpub\wwwroot and now it works.

Roland Smith
  • 957
  • 4
  • 7