How to config ASPNETCORE_ENVIRONMENT for ASP.NET Core Application?

Programming, error messages and sample code > ASP.NET
Update web.config with an <environmentVariables> section under <aspNetCore>
 
<configuration>
  <system.webServer>
    <aspNetCore .....>
      <environmentVariables>
        <environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Development" />
      </environmentVariables>
    </aspNetCore>
  </system.webServer>
</configuration>
 
Alternatively, set it from your Control Panel > Advance > Environment Variables, please see details