0

I am trying to deploy an Asp.net boilerplate app on azure and I have already deployed my backend and the Swagger application is working fine, when I try to also deploy the Angular frontend I keep getting this error: HTTP Error 502.5 - ANCM Out-Of-Process Startup Failure.

I have found other threads discussing this problem, but since I am using the ASP.NET Boilerplate framework i do not have a .exe or .dll file that I can run to start the Web.Host project, not that I'm aware of atleast.

The logs in Kudu show this: Application '/LM/W3SVC/288745522/ROOT' with physical root 'D:\home\site\wwwroot\' failed to start process with commandline '%LAUNCHER_PATH% %LAUNCHER_ARGS%'.

It probably has something to do with those %LAUNCHER% variables not being found, I have found some other threads suggesting your should replace the LAUNCHER_ROOT [projectname].exe or [projectname].dll but I cant seem to find these in my project. This might be because of the way ASP.NET Boilerplate is built up.

This is my web.config:

<configuration>
  <system.webServer>
    <handlers>
      <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
    </handlers>
    <aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false" startupTimeLimit="3600" requestTimeout="23:00:00">
      <environmentVariables />
    </aspNetCore>
    <httpProtocol>
      <customHeaders>
        <remove name="X-Powered-By" />
      </customHeaders>
    </httpProtocol>
  </system.webServer>
</configuration>
Jobje325
  • 55
  • 12
  • Possible duplicate of [IIS fails to run ASP.NET Core site - HTTP Error 502.5](https://stackoverflow.com/questions/41590493/iis-fails-to-run-asp-net-core-site-http-error-502-5) – Lex Li Aug 26 '19 at 17:23
  • @LexLi The answers given in the other thread do not work for the ASP.NET Boilerplate framework I'm using, please check my edit in the second paragraph – Jobje325 Aug 26 '19 at 18:07
  • It is still a duplicate, as the cause of 502.5 remains the same. Remove if you don't use it. – Lex Li Aug 26 '19 at 18:14

1 Answers1

1

Error message indicates that the ASP.NET Core Module attempts to start the worker process but it fails to start. The cause of a process startup failure can usually be reviewed from entries in the Application Event Log and the ASP.NET Core Module stdout log. Both logs can be found on the Kudu/SCM site in d:\home\Logfiles. In your web.config file located in the wwwroot folder, enable stdout logs, as so: Web.config sample:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.webServer>
    <handlers>
      <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
    </handlers>
    <aspNetCore processPath="dotnet" arguments=".\MyApplicationAssembly.dll" stdoutLogEnabled="true" 
    stdoutLogFile="\\?\%home%\LogFiles\stdout" forwardWindowsAuthToken="false" />
  </system.webServer>
</configuration>

Please check the eventlog.xml and the stdout logs you have collected.

enter image description here

Reference: https://blogs.msdn.microsoft.com/waws/2018/06/10/troubleshooting-http-502-5-startup-issues-in-azure-appservice-for-asp-net-core-websites/

Additional troubleshooting methods for ASP.Net at

https://learn.microsoft.com/en-us/aspnet/core/test/troubleshoot-azure-iis?view=aspnetcore-2.2#troubleshoot-on-azure-app-service.

Hope it helps.

Mohit Verma
  • 5,140
  • 2
  • 12
  • 27
  • The logs in the stdout logs do generate but are emtpy so those are no help to me. This is is the error I am getting in the eventlog.xml: `Application '/LM/W3SVC/288745522/ROOT' with physical root 'D:\home\site\wwwroot\' failed to start process with commandline '%LAUNCHER_PATH% %LAUNCHER_ARGS%' with multiple retries. The last try of listening port is '10830'. See previous warnings for details.` – Jobje325 Aug 27 '19 at 09:01