Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

asp.net core development model

Error. An error occurred while processing your request. Development Mode 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 do i use the development model after publish iis

like image 722
witson Avatar asked Jun 24 '16 18:06

witson


1 Answers

You can try setting the environment variable inside the aspNetCore element in the web.config like this:

<aspNetCore....> 
  <environmentVariables> 
    <environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Development" /> 
  </environmentVariables>
</aspNetCore>. 

Such a change to web.config should be preserved during publish.

like image 159
Pawel Avatar answered Sep 18 '22 16:09

Pawel