Last post Oct 24, 2012 01:23 PM by billyhartman21
Aug 03, 2012 05:00 PM|buckmastr|LINK
Been using Web Deployment projects (VS 2010) for a while now and web.config replacements of the appSetting, connectionStrings, and mailSettings have always worked perfectly for me.
Recently however, I have ran into an issue where I need to replace the <configSections>. I have tried:
And various other variations of this. I always get
Error 29 web.config(1): error WDP00002: missing section configSections. 1 1 my_deploy
Is replacing the configSection not possible with web deployment project?
The basic premise for doing this is that this .NET 2.0 project is deployed as a nested application in IIS and this section conflicts with the parent .NET 4 application which already includes some of the sectionGroups in machine.config. I want to add a <remove
/> element to the child web.config at deployment or even remove the section all together.
Aug 06, 2012 06:59 AM|Dino He - MSFT|LINK
Same discussion here:
Hope it helpful.
Aug 06, 2012 09:17 AM|buckmastr|LINK
Well, they are discussing replacements using the same tool I am using but none of those posts were specific to my problem. I have no problem doing replacements in the system.web, appSettings, connectionStrings, mailSettings, etc. I do those all the time.
I'm trying to completely remove the <configSections> element and it's contents during my staging build or insert <remove /> elements.
Aug 06, 2012 09:34 AM|buckmastr|LINK
Well it doesn't appear that remove or clear will work for me either. See the first comment here: http://msdn.microsoft.com/en-us/library/ms228258.aspx
Oct 24, 2012 01:23 PM|billyhartman21|LINK
@buckmastr, your link is to a topic that is no longer available. I am getting the error while trying to use the SetAttributes() as shown below.
This is from my web.config file.
<compilation debug="true" strict="true" explicit="true">
This is from my web.Debug.config file.
<compilation debug="false" strict="true" explicit="true" xdt:Transform="SetAttributes(debug,strict,explicit)"></compilation>