c# - Prevent web.config change on web deployment -


we have web deployment package app developed in c#, when installed in iis web.config has several settings in it, example:

<appsettings>   <add key="webpages:version" value="3.0.0.0"/>   <add key="webpages:enabled" value="false"/>   <add key="clientvalidationenabled" value="true"/>   <add key="unobtrusivejavascriptenabled" value="true"/>   <add key="reportfiles" value="http://localhost/reporttemp/"/> </appsettings> 

a setting may changed (for example reportfiles above) @ each site deployed , if there update app install latest web deployment package.

unfortunately overwrites settings may have changed, default. means every time update application have take copy of web.config, update copy back.

is there way of stopping web.config being updated once created? or during web deployment allowing installer see existing settings , decide whether keep?

take @ web.config transforms

https://msdn.microsoft.com/en-us/library/dd465318(v=vs.100).aspx

or this

how prevent 'publish web' overwriting config files?


Comments

Popular posts from this blog

symfony - InvalidConfigurationException in SecurityExtension.php line 429: No authentication listener registered for firewall "secured_area" -

angular ui router - 10 digest iterations reached in angularjs when using $state.go -

javascript - Handling constructor related functions while testing with mocha and sinon -