Last post Sep 19, 2016 05:43 PM by firstname.lastname@example.org
Sep 09, 2016 12:50 PMemail@example.com|LINK
I am new to asp.net core application.
I have an asp.net core application which uses repository pattern. It have an api controller named ApplicationsAPIController.
ApplicationsAPIController has a GetApplications method which return all applications.
I have app published to remote server. While calling GetApplications api from postman throws500 Internal Server Error with following HTML as response:
<h2 class="text-danger">An error occurred while processing your request. </h2>
<strong>Development</strong> environment will display more detailed information about the error that occurred.
<strong>Development environment should not be enabled in deployed applications</strong>, 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
<strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to
<strong>Development</strong>, and restarting the application.
Note: Above api is working perfectly in development enviroment (locally).
As per the error, i think i have to set up a staging or production environment. But i could not find any good and step by step document to setup. I have tried it many ways but failed.
Can anyone please help me out.
Sep 09, 2016 03:49 PM|Radomir|LINK
The message is saying that if you switch TO Development environment (by changing that env variable), you will get more detailed error message. You could do that or you could add some error logging to your app to find out what is going on.. either of the
two should work, but the goal is to get more details about what the underlying exception is..
Sep 19, 2016 05:43 PMfirstname.lastname@example.org|LINK
Thanks, but i get it solved myself. There is problem in database connection string.