[.Net Core] An error occurred while processing your request.(Development Mode)

Sandy Lin
1 min readFeb 1, 2020
Error.An error occurred while processing your request.Request ID: |32b575ca-4d7b848c1937590c.Development ModeSwapping to the Development environment displays detailed information about the error that occurred.The Development environment shouldn’t be enabled for deployed applications. It can result in displaying sensitive information from exceptions to end users. For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development and restarting the app.

According to the details of the error, it indicated that your project are not running under development mode so that it is not possible for you to debug your code.

Solution 1:

Check “env” tag in launch.json for your project, add the following:

“configurations”: [
{
......
“env”: {
“ASPNETCORE_ENVIRONMENT”: “Development”
},
......
}

Solution 2:

if Solution 1 is not working, try running the following command in your terminal:

$export ASPNETCORE_Environment=Development

--

--

Sandy Lin

Software Engineer & Science/Art/Music/Sports lover & LEGO enthusiast & Adventurer 🎻 🎹 🎸 🎨 📸 🛹 🏂 🏄 🏊 🤿 ⚽️ https://hsinjulin.astroneuro.com/