I took over a project from a guy who didn't really know what he was doing in terms of angular / .net core / node js, etc.
We have a new version that works on my machine (of course), but for some reason, when I updated the web server, I'm getting 502.5.
Yes, I know there are a lot of 502.5 posts on SO, but still have the problem... not sure what to do next :(. Also, I'm not a web guy, I just took this over as a favor.
Here is what I know right now:
1) works fine on my machine 2) used to work fine on the web server until the latest push (I have done other pushes) 3) the site is NOT a DLL like some of the other SO posts, mine is an exe for some reason. 4) event log shows:
Application 'MACHINE/WEBROOT/APPHOST/xxxCONTROL' with physical root 'C:\inetpub\wwwroot\xxxControl\' failed to start process with commandline '.\xx_control.exe ', ErrorCode = '0x80070002' : 0.
Some of the other SO posts with the apps running as DLLs have the exe as the arg and dotnet as the proc. Do I need to do that?
5) if I just run xx_control, it starts and runs on localhost:
6) my web config looks like this:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath=".\xx_control.exe" arguments="" stdoutLogEnabled="false">
<environmentVariables />
</aspNetCore>
</system.webServer>
<connectionStrings>
<add name="xxxx" connectionString="Server=xxxxxx;Database=xxxxx;Uid=xxxxxx;pwd=xxxxx;" providerName="System.Data.SqlClient" />
</connectionStrings>
</configuration>
7) If I try do a publish, it errors out (it always has which is why I was copying the stuff over manually)
1>------ Build started: Project: xxx_Control, Configuration: Release Any CPU ------
1>xxx_Control -> C:\Source\xxx\xxx\xxx_Control\bin\Release\net472\xxx_Control.exe
2>------ Publish started: Project: xxx_Control, Configuration: Release Any CPU ------
Connecting to C:\Windows\Temp\xxx...
xxx_Control -> C:\Source\xxx\xxx\xxx_Control\bin\Release\net472\win7-x86\xxx_Control.exe
npm install
npm WARN saveError EPERM: operation not permitted, rename 'C:\Source\xxx\xxx\xxx_Control\npm-shrinkwrap.json.1698582667' -> 'C:\Source\xxx\xxx\xxx_Control\npm-shrinkwrap.json'
audited 15221 packages in 9.82s
found 183 vulnerabilities (125 low, 52 moderate, 5 high, 1 critical)
run npm audit fix
to fix them, or npm audit
for details
node node_modules/webpack/bin/webpack.js --config webpack.config.vendor.js --env.prod
internal/modules/cjs/loader.js:583
throw err;
^
EXEC(0,0): Error : Cannot find module './$data' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15) at Function.Module._load (internal/modules/cjs/loader.js:507:25) at Module.require (internal/modules/cjs/loader.js:637:17) at require (internal/modules/cjs/helpers.js:20:18) at Object. (C:\Source\xxx\xxx\xxx_Control\node_modules\ajv\lib\ajv.js:10:23) at Module._compile (internal/modules/cjs/loader.js:689:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10) at Module.load (internal/modules/cjs/loader.js:599:32) at tryModuleLoad (internal/modules/cjs/loader.js:538:12) at Function.Module._load (internal/modules/cjs/loader.js:530:3) C:\Source\xxx\xxx\xxx_Control\xxx_Control.csproj(111,5): Error MSB3073: The command "node node_modules/webpack/bin/webpack.js --config webpack.config.vendor.js --env.prod" exited with code 1.
2>Build failed. Check the Output window for more details. ========== Build: 1 succeeded, 0 failed, 1 up-to-date, 0 skipped ========== ========== Publish: 0 succeeded, 1 failed, 0 skipped ==========
7) I'm supposed to copy the bins from bin\Release\net472 correct? There are also some in the bin\Release\net472\win7-x86 directory.. I tried both for the heck of it... same thing...
Any ideas?
I ran into this recently, with a project that was initially netcoreapp, then had to be changed to net461 for the framework, due to dependencies. Hence the file used is an exe, not a DLL.
Removing all of the files in the deployed directory, and publishing again, got it working for me.
User contributions licensed under CC BY-SA 3.0