Free Code Snippets in C#, Net Framework, Office 365, ASP.Net,WPF, Visual Studio, SQL Server, Antivirus free
#

 

 

Where are the detail errors of the Asp.Net Core web application written?

When creating an Asp.Net core application, errors are written by the IIS Internet Information Server in the Windows Event Viewer and internal errors of the Asp.Net Core application are written internally as stdout.log.

Where do you find the log errors?

 

State:

Asp.Net Core application on IIS 10 and Windows Server 2016

When opening Asp.Net Core on IIS Server, an error http Error 502.5 Process Failure appears

 

Error message in the browser:

HTTP Error 502.5 - Process Failure

Common causes of this issue:

  • The application process failed to start
  • The application process started but then stopped
  • The application process started but failed to listen on the configured port

Troubleshooting steps:

  • Check the system event log for error messages
  • Enable logging the application process' stdout messages
  • Attach a debugger to the application process and inspect

 

 

Under the Windows Server Event Viewer you will first find the warning:

warning:

Could not create stdoutLogFile \\?\C:\_Daten\_web\AspCore2_02\logs\stdout_3928_20184188247.log, ErrorCode = -2147024893.

 

 

 

In the local application file web.config

The aspNetCore application writes down the errors only if you set the setting in the web.config of the aspnetcore application

set stdoutLogEnabled from false to true to find the detailed bugs.

stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout"

 

Example of the web.config in the Publish output of the asp.net core project

<?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=".\AspCore2_01.dll"

                stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" />

  </system.webServer>

</configuration>

 

 

Solution:

You have to create a subfolder in the Asp.Net Core application

Subdirectory: logs

 

Once you've created a subfolder called logs, all errors will be written there when opening an Asp.Net Core application.

 

Following error in detail:

Error:

  An assembly specified in the application dependencies manifest (AspCore2_01.deps.json) was not found:

    package: 'Microsoft.AspNetCore.Antiforgery', version: '2.0.2'

    path: 'lib/netstandard2.0/Microsoft.AspNetCore.Antiforgery.dll'

  This assembly was expected to be in the local runtime store as the application was published using the following target manifest files:

    aspnetcore-store-2.0.6.xml

 

Mobile
»
Kestrel web server Asp.Net Core 2 MVC hangs
»
Asp Net Core MVC: Login failed for user IIS APPPOOL \ Readdy
»
Error message: An assembly specified in the application dependencies manifest was not found
»
Asp Core Error: Could not create stdoutLogFile
»
Finding bugs in Asp.Net Core 2 MVC applications.

.

Contact for Jobs, Project Requests: raimund.popp@microsoft-programmierer.de