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): ...