4
votes

I am new to .Net core environment and facing issue while deploying application into IIS.

After publishing code and deploying into IIS server(Version 7), I am able to start application from Kestrel by going into directory where application hosted and running below command.

c:\inetpub\demoapp\dotnet "My App.dll"

By running above command, Kestrel is running on http://localhost:5000 and I am able to browse from browser. I am using latest .Net Core version 2.2.

But when I am trying to execute URL from IIS hosted application, I am getting below error.

HTTP Error 502.5 - ANCM Out-Of-Process Startup Failure

Below is the event log from windows application log.

Application '/LM/W3SVC/49/ROOT/demoapp' with physical root 'C:\inetpub\demoapp\' failed to start process with commandline 'dotnet .\MyApp Web.dll' with multiple retries. The last try of listening port is '2405'. See previous warnings for details.

Anyone having idea how to resolve it?

1
does 2405 port available for use?Derviş Kayımbaşıoğlu
Thank you Simonare! That port is changing everytime. Also tried out Git Hub link but no solution works for me unfortunately.Dharmesh Solanki
Open web.config and add quotes to your process name (as it contains space).Lex Li
Hi Lex Li... Thank you for your reply... I tried to set web.config entry like below but doesn't work. <aspNetCore processPath="dotnet.exe" arguments="'.\My App.dll'" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />Dharmesh Solanki

1 Answers

0
votes

In my case, It was win-64 architect issue.

You can change or switch architect from win-64 to win-86 then publish and don't forget to change Enable 32-bit Applications in IIS manager:

  • Right-click on the Application Pool and select “Advanced Settings…” or select the same from the Actions pane after selecting the Application pool.

  • Change the “Enable 32-bit Applications” to True (if you want the application pool to spawn in a 32-bit mode) Click OK.

p.s.: Don't forget to delete existing published files.