categories: [ Just Coding ] tags: [ dotnet core ] [ IIS ]
created: 13 May 2018 @ 18:53 modified: 15 May 2018 @ 00:39
I received a new error today that I haven't received before when deploying dotnet core apps. It was as the title suggest a "HTTP Error 502.5 - Process Failure" error
None of the suggestions had any affect and hours of Googling also didn't help either until eventually I came across a solution that worked
Although that solution worked for me it wasn't good enough. The problem here is that I deploy everything through TFS or VSTS so I couldn't just manually set the value.
Although hacky, my solution works for me. similar to how the solution above worked for jdownie . I'm lucky enough to be able to place an agent on my web server so I can run this method otherwise unzipping, hard coding the value from the build server and zipping up the publish package can also work.
Basically what I have done is after I web deploy I have a final phase which checks the machine Paths environment variable and sets the processPath to the first path it finds that contains dotnet.exe in it
Now on every deploy I have a running site that is guaranteed to have a valid dotnet.exe value
and I guess more importantly a running site
dotet core although getting mature is not quite there in all aspects and you are going to hit some issues with it that you wouldn't expect.
The great thing about this is the support from the community and Microsoft is brilliant and the decision to go dotnet core would not be a bad one .
It also appears that something was wrong on the server which is why dotnet.exe wasn't being picked up even after a reboot but that's a investigation for another day