Please Login to Continue

Free Software Development Articles.Email List

Advertise Here

How to Debug Asp.Net Core 3.1 in IIS Development Environment Variable

Question: How do you troubleshoot IIS Asp.Net Core 3.1 that is running in Production Mode.

Answer: If you want to troubleshoot an Asp.Net Core 3.1 running in IIS, you need to see the errors that the application is emitting by adding a Development environment variable in IIS.

- Open up IIS
- Click on "Configuration Editor"
- Click in the Dropdown menu that says "Section" and choose "System.webServer"
- Find "AspNetCore" and click on it.
- Make sure the "From" Dropdown menu is populated by the "dashboard Web.config"
- In the Main Window, Click to the right of "EnvironmentVariable" on the "three dots"
- Click "Add" to add a Key-Value pair
- In the "Name" textbox type in "ASPNETCORE_ENVIROMENT" and in the "Value" textbox type in "Development"

After you fill in the textbox, close the window and test your application in IIS to see the error.

[Important]: Make sure you reverse the settings to Production Environment Variable when you are done.

 

Debug Asp.Net Core 3.1 in IIS Technology published
Buy Me Coffee

Was this page helpful?

Yes Yes! this solution to the problem was helpful. No No! this solution to the problem was not helpful..



© 2020 - ErnesTech - Privacy