Last post Sep 08, 2019 05:29 AM by firstname.lastname@example.org
Sep 07, 2019 03:22 PMemail@example.com|LINK
I've deployed my asp.net core 2.1 application local on my development pc (Windows 10) of course after installing Core 2.1.11 Windows Server Hosting.
some of views are working successfully while others arn't (specially those return a list) which give me this error:
Request ID: 0HLPJKLEMG4JA:00000004
Swapping to Development environment will display more detailed information about the error that occurred.
Development environment should not be enabled in deployed applications, as it can result in sensitive information from exceptions being displayed to end users. For local debugging, development environment can be enabled by setting the
ASPNETCORE_ENVIRONMENT environment variable to Development, and restarting the application.
How to solve please?
Sep 07, 2019 03:52 PM|bruce (sqlwork.com)|LINK
Sep 07, 2019 04:37 PMfirstname.lastname@example.org|LINK
There is no Web.config in core apps rather we have appsettings.json.
Sep 07, 2019 05:11 PM|bruce (sqlwork.com)|LINK
Sep 07, 2019 06:46 PMemail@example.com|LINK
I've added the environment variable to the IIS, Then this error appears:
SqlException: Cannot open database "Maintenance" requested by the login. The login failed. Login failed for user 'IIS APPPOOL\Mobile'.
Sep 08, 2019 05:29 AMfirstname.lastname@example.org|LINK
I've solved the issue.
Firstly, I should set the environment variable to IIS as you said as following:
Then add a Login to SQL Server as following: