This is the 29th day of my participation in the August Wenwen Challenge.More challenges in August

  • 📢 welcome to like: 👍 collect ⭐ message 📝 if there are mistakes please correct, give people rose, hand left lingering fragrance!
  • 📢 This article was originally written by Webmote and originally published by Nuggets.
  • 📢 author’s motto: life is toss about, when you don’t toss about life, life will start to toss about you, let us come on together! 💪 💪 💪

1. Hope nothing bad happens

When you see it, it must be heartbreaking and head-aching.

It usually contains no (or very little) information in the application logs, and it’s a guaranteed bad day if you’re unlucky enough to run into the problem that caused this error.

In this blog post, I’ll try to include as many solutions as possible, and if not, feel free to comment and contribute one.

2. You are miserable and wrong

This is a list of errors I have encountered, and it may not be complete. If I missed something, please comment.

  • An error occurred while starting the application
  • 403.14 ban
  • 502.5 The process fails
  • 500 Internal server error
  • 500.0 Failed to load the in-process handler
  • 500.30 Failed to start the intra-process
  • 500.31 ANCM could not find the local dependency
  • 500.32 ANCM failed to load DLL
  • 500.33 ANCM request handler load failed
  • 500.34 ANCM hybrid hosting model is not supported
  • 500.35 ANCM Multiple in-process applications in the same process
  • 500.36 ANCM out-of-process handler load failed
  • 500.37 ANCM startup failed within startup time
  • 500.38 ANCM application DLL could not be found
  • 503 The service is unavailable
  • Unable to start application (error code “0x800700C1”)
  • Connection reset

The English errors are below

  • An error occurred while starting the application
  • 403.14 who
  • 502.5 the Process Failure
  • 500 Internal Server Error
  • 500.0 In-Process Handler Load Failure
  • 500.30 the In – Process Startup Failure
  • 500.31 ANCM Failed to Find Native Dependencies
  • 500.32 ANCM Failed to Load DLL
  • 500.33 ANCM Request Handler Load Failure
  • 500.34 ANCM Mixed Hosting Models Not Supported
  • 500.35 ANCM Multiple in-process Applications In the same Process
  • 500.36 ANCM Out-Of-Process Handler Load Failure
  • 500.37 ANCM Failed to Start Within Startup Time Limit
  • 500.38 ANCM Application DLL Not Found
  • 503 Service unavailable
  • Failed to start application (ErrorCode ‘0x800700c1’)
  • Connection reset

3. Possible solutions

Keep in mind that most solutions require restarting the application pool. This means that you need to find the correct application pool and restart it.

  1. The application did start, but could not generate a valid response. Try to debug locally, correct errors, and redeploy.
  2. Dotnet is not installed on a managed system. Visit dotnet.microsoft.com/download and download the latest version. Try using an older OPERATING system SDK.
  3. The dotnet version is incorrect.dotnet --versionRun validation under CMD.

    accessdotnet.microsoft.com/downloadAnd download the latest version. Try using an older OPERATING system SDK.
  4. appsettings. [ENVIRONMENT_NAME] .jsonThere is no deployment for a specific environment.

    Create the necessaryappsettingsFile.
  5. appsettings.jsonOr do not include all necessary Settings.appsettings. [ENVIRONMENT_NAME] .json

    Add the correctappsettingsAll Settings in the file.
  6. You enabled XML document, but the XML document file path is incorrect.

    Right-click your project in Visual Studio and go toPropertiesAnd thenBuildAnd will beDocument XML fileThe path is changed to a relative path.
  7. The permissions for the remote computer folder are not set correctly.

    Test only: Try to addEveryoneAnd reset permissions on all child objects. readingIn this paper,To get the right permissions.
  8. The error folder on which the application is deployed on the managed system.

    Go to theIISFind yourssiteAnd click on writeexploreTo find the right path.
  9. web.configThe file is missing from deployment, or the content of the web.config file is incorrectly formatted.

    In the Visual StudioRight click on your project and go toPublish. Execute the release and use itweb.config.
  10. theweb.configcontainshostingModel="inprocess"(or not). \
Remove it if it exists, add it if it doesn't.Copy the code
  1. The application is not published for the same processor architecture. \
Review the processor architecture in the managed system and select the correct architecture during release.Copy the code
  1. Run the application in a separate IIS application pool. \
Go to IIS on the host, navigate to *Application Pools*, and click *Add Application Pool... *, write down the *Name* that you use and click *OK*. When you're done, go to the site, find the correct application, and click basic Settings to select the newly created application pool.Copy the code
  1. Fix.net Core Hosting Bundle installation or install SDK. \
Visit < https://dotnet.microsoft.com/download > and download the latest version. Try using an older OPERATING system SDK.Copy the code
  1. Check for peak CPU/ memory usage on the server during startup. \
Try to upgrade the host.Copy the code
  1. Single file publishing is disabled. \
To do this, set the 'PublishSingleFile' MSBuild property to false.Copy the code
  1. Switch to the out-of-process managed model. \
To do this, set the 'AspNetCoreHostingModel' MSBuild property to 'OutOfProcess'.Copy the code

4. Enable logging

The ASP.NET Core module standard output log typically logs useful error messages that are not found in the application event log. To enable and view standard output logging:

  1. Navigate to the deployment folder of the site on the managed system.
  2. The editorweb.configFile. Set up thestdoutLogEnabledtotrueAnd change thestdoutLogFileThe path points to the log folder (for example,\ _ log \ Standard output).stdoutThe log file name prefix is in the path. Time stamps, process IDS, and file extensions are automatically added when logs are created.
  3. If the log folder does not exist, create it.
  4. Ensure that your application pool’s identity has write permissions on the log folder.
  5. Save the updated web.config file.
  6. Make a request to the application.
  7. Navigate to the log folder. Find and open the latest standard output log.
  8. Research error log

5. Summary

Hope you have a nice day!

Routine summary, rational view!

Knot is what ah, knot is I want you to praise but can not get lonely. 😳 😳 😳

👓 have seen this, but also care about a thumbs-up?

👓 has been liked, but also care about a collection?

👓 are collected, but also care about a comment?