I'm a newbie learner of ASP.NET. I was following along this ASP.NET Razor pages tutorial and deployed my app to Azure.
But when I'm trying to access this Movies page, I'm getting this error.
Error.
An error occurred while processing your request.
Request ID: | f9ecac03-478613f8cb88adc0.
Development Mode Swapping 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.
I've tried this existing solution and changed the mode to production but the problem remained the same.
Here is my launch setting -
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:50335",
"sslPort": 44327
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Production"
}
},
"Polling_System": {
"commandName": "Project",
"launchBrowser": true,
"applicationUrl": "https://localhost:5001;http://localhost:5000",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Production"
}
}
}
}
My deployment mode was Framework-Dependent and later I changed it to Self-Contained.
Can anyone help me to resolve this problem? Thanks.
P.S. The page works properly on my machine if the value of "ASPNETCORE_ENVIRONMENT":
is set to "Development"