I created a test ASP.NET Core web app and published it to azure via Web Deploy...
When I try to access a page controller via the site URL, I have the following:
I have mainly non-modified by default
also a
lauchSettings.json
file with
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:23403/",
"sslPort": 0
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"IIS Express (Staging)": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Staging"
}
},
"IIS Express (Production)": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Production"
}
},
"MyApplication": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "http://localhost:23404"
}
}
}
What should I do in order to modify the ASPNETCORE_ENVIRONMENT variable when publishing it via
PS.
I updated the App Settings in Azure portal, like this
then republished the application...
But nothing changed, I have the same Error...