The Web.Config file

If the Web.config file is not present upon the application first run, it will be autogenerated in the root-level folder with the default settings that will best suit the application. In our sample scenario, we should find something like this:

<?xml version="1.0" encoding="utf-8"?><configuration>  <system.webServer>    <handlers>      <add name="aspNetCore" path="*" verb="*"       modules="AspNetCoreModule" resourceType="Unspecified" />    </handlers>    <aspNetCore processPath="dotnet" arguments=".\TestMakerFreeWebApp_Chapter_10.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />  </system.webServer></configuration>

Here's how we can tweak it to set up the ASPNETCORE_ENVIRONMENT environment variable (updated lines are highlighted): ...

Get ASP.NET Core 2 and Angular 5 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.