Reputation: 1107
When publishing a .Net Core app to a server via WebDeploy, a Web.Config file is created, with stdoutLogEnabled=false
. This is overwriting the web.config on the server where I have set stdoutLogEnabled=true
.
I struggling to find how I set the default value of stdoutLogEnabled
prior to publishing. On .Net framework apps I would do this within the web.config file with transformations, however in .Net core I actually don't have a web.config file within my solution.
I've tried to find documentation on how to set the value, but it either doesn't exist, or more likely, I'm not using the correct search term. Can somebody please advise on how to set default values in the web.config.
Upvotes: 27
Views: 9522
Reputation: 934
Create a web.config and put it the root directory of your source, Modify the web.config file to enable logging and any other customization you need.
When you publish, it’ll use that file instead of generating a completely new file.
Upvotes: 33