24

I use asp.net core 2 Preview 2.

I opened stdoutLogEnabled = "true" in web.config but the system does not write logs.

Deploying on windows server 2012 r2 gives :

Error

HTTP Error 502.5 - Process Failure.

Web.config

<aspNetCore processPath="dotnet" arguments=".\App.WebHost.dll" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false" />

Logs

image logs

Please help me.

LuFFy
  • 8,799
  • 10
  • 41
  • 59
VN-Clip.com
  • 241
  • 1
  • 2
  • 6

9 Answers9

16

I had this same problem, even after installing the hosting bundle. The solution was in the documentation -

Restart the system or execute net stop was /y followed by net start w3svc from a command prompt to pick up a change to the system PATH.

This is done after installing the .NET Core Windows server hosting bundle.

James Skemp
  • 8,018
  • 9
  • 64
  • 107
majita
  • 1,278
  • 14
  • 24
7

Try to install .NET Core SDK on the server:

https://www.microsoft.com/net/download/core

It solved the same problem for me.

7

You need add this to your project :

<PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest>

Please view attached picture.

enter image description here

Pradeep
  • 9,667
  • 13
  • 27
  • 34
4

Try using exact location of dotnet.exe in web.config processPath="dotnet", i.e. In my case C:\Program Files(x86)\dotnet\dotnet.exe

Dhananjay Patil
  • 149
  • 2
  • 6
2

Brand new .net core 2.1 app trying to deploy to new Azure app service with new app service plan. Same issues, namely 502.5 error ( HTTP Error 502.5 - Process Failure ).

I implemented the above steps and still ran into errors. I opted to use the chose the self-contained deployment mode (compared to framework dependent (win-x64)).

This resolved my issue.

This answer was also submitted to [question]: .net-core-2.0 azure app service 502.5 error

Perhaps these questions should be linked.

daviesdoesit
  • 805
  • 9
  • 14
1

I had the same problem

You must install "Windows Hosting Bundle"

This is the newest version 2.1.0 and supports the old version

https://www.microsoft.com/net/download/thank-you/dotnet-runtime-2.1.0-windows-hosting-bundle-installer

M.R.T
  • 746
  • 8
  • 20
0

I was having the same problem

I installed .NET Core 2.0 Preview 2 (the button in point 1) on the server https://www.microsoft.com/net/core/preview#windowscmd

and it's running now

Anthony Johnston
  • 9,405
  • 4
  • 46
  • 57
0

The same issue occurred then got resolved to follow below steps.

1: First delete .bin and.obj folder......mean Clean your application.

2: Definitely this is version mismatching issue to see this >> go to "ASP.Net Core WebServer" in the Output window to see action error. In VS 2017, My case . 2.1.4 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] AdminLTE> It was not possible to find any compatible framework version AdminLTE> The specified framework 'Microsoft.AspNetCore.App', version '2.1.5' was not found.

3: Install Microsoft.AspNetCore.App 2.1.5 (for mine) through package manager console.

4: Rebuild again then issue got fixed.

Please reply if still getting the same issue.

0

First you have to check the required dot net version, Confirm the same version applied in both server and developed local machine. Using Command prompt :

>dotnet --info

Solution 2:

Execute the dll file using command prompt with dotnet interpreter

YOUR_DLL_PATH> dotnet yourdllpath.dll 

By this you can find the actual error.

Good luck

Mahesan Rv
  • 11
  • 2