1
votes

I'm investigating an issue with the asp.net core 1.1 web app.

We had to install the latest VS 2017 on the build server. And straight after that, all the deployed builds return 502 responses. Nothing changed in the app code or the referenced packages, however, many binaries are different after VS 2017 install. The deployment is done via FTP.

I also noticed there is now a small difference in Http response headers. API Response Headers used to have Server: Kestrel. But now, after installing VS2017, the deployed builds return Server: Microsoft-IIS/10.0. This probably explains 502 error, but why would the Server now switch to IIS?

1
interesting that you install VS on build servers - Jaya
Had to, otherwise, a new azurefunctions app wouldn't build with msbuild - Boris Lipschitz
Unrelated to your actual question, but if you're only using .net core, the dotnet-core-sdk would suffice for builds. - galdin
it's using dotnet publish - Boris Lipschitz
how are you deploying via ftp? just copying the files or you are using visual studio's publish? ' - Neville Nazerane

1 Answers

4
votes

Managed to fix it. The error is caused because IIS server (proxy) can't access AspNetCoreModule, the process that hosts kestrel. Usually, the reason is because kestrel in some trouble. The solution starts with checking Application logs in Event Viewer on the server. In my case it was:

Application 'MACHINE/WEBROOT/APPHOST/MyApp.API' with physical root '\servername\c$\inetpub\wwwroot\MyApp.Api\' failed to start process with commandline '"dotnet" .\MyApp.Api.Web.dll', ErrorCode = '0x80004005 : 80008083.

So, by googling the error code I've realised that the server didn't have the right asp.net core version (for some reason).

Downloaded the installer, works fine now! :)