DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Wed, 1 Aug 2007 15:22:01 -0700,    posted on: microsoft.public.dotnet.framework.aspnet        back       

Thread Index
  1    Chuck P am
          2    (Steven Cheng[MSFT])
                 3    Chuck P am
                 4    (Steven Cheng[MSFT])


web.config section replacement   
I replace a lot of web.config sections during compile.
I am having trouble with a custom section is it possible to replace a custom 
section?


Error     44         web.config(1): error WDP00002: missing section 
ExceptionHandler.                       1          1            
CriticalSkills_deploy

 

<sectionGroup name="ExceptionHandler">

      <section name="eMail" 
type="System.Configuration.SingleTagSectionHandler" 
restartOnExternalChanges="true"/>

      <section name="ContactInfo" 
type="System.Configuration.SingleTagSectionHandler" 
restartOnExternalChanges="true"/>

    </sectionGroup>

 

<!-- Error Handler Configuration Settings -->

  <ExceptionHandler>

    <eMail connectionStringName="cnnMailQueue" emailTo="aamntz@lanl.gov"/>

    <ContactInfo contactText="criticalskills@lanl.gov"/>

  </ExceptionHandler>
Date:Wed, 1 Aug 2007 15:22:01 -0700   Author:  

RE: web.config section replacement   
Hi Chuck,

Regarding on this web deployment project "section replacement" with custom 
section handler issue, I've performed some local test and did repro the 
same behavior you mentioned.  After some further research, I found that the 
problem is due to the MSBUILD engine will use configuration API to process 
the web.config file(to do the section replacement), that means if you're 
using custom section handler, the msbuild app need to be able to locate the 
custom section handler's assembly. And for custom section handlers in a 
custom private assembly(in application's bin dir), msbuild won't be able to 
locate it. Here is a web thread on forum mentioned the same issue:

http://forums.asp.net/t/1062816.aspx

and currently, some possible workaround options are available:

** strongname the custom seciton handler asembly and put it into GAC so 
that msbuild engine can locate it

** instead of section replacement(of web deployment project), you can use 
"configSource" attribute of web.config (ASP.NET 2.0 specific) to specify a 
section's content in a separate file.

Hope this helps.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

 

==================================================

Get notification to my posts through email? Please refer to 
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

 

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues 
where an initial response from the community or a Microsoft Support 
Engineer within 1 business day is acceptable. Please note that each follow 
up response may take approximately 2 business days as the support 
professional working with you may need further investigation to reach the 
most efficient resolution. The offering is not appropriate for situations 
that require urgent, real-time or phone-based interactions or complex 
project analysis and dump analysis issues. Issues of this nature are best 
handled working with a dedicated Microsoft Support Engineer by contacting 
Microsoft Customer Support Services (CSS) at 
http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================
 	

This posting is provided "AS IS" with no warranties, and confers no rights.
Date:Thu, 02 Aug 2007 07:36:00 GMT   Author:  

RE: web.config section replacement   
Thanks Steven,
I think I'll search around for an msbuild xml replacement task and see if I 
can do it that way.
Date:Mon, 6 Aug 2007 07:40:15 -0700   Author:  

RE: web.config section replacement   
Thanks for your followup Chuck,

For the current built-in WDP's limitation, I suggest you submit it on our 
product feedback site:

http://connect.microsoft.com/feedback/default.aspx?SiteID=210

Also, for custom MSBUILD tasks, I would recommend the following open source 
community project which provides many custom tasks:

#community tasks project
http://msbuildtasks.com/default.aspx

In addition, here is a web article introduce creaeting a custom msbuild 
task to modify a certain xml configuration file.

#Using Custom Tasks in MSBuild to modify XML Configuration Files on the Fly
http://www.c-sharpcorner.com/UploadFile/mgold/MSBuildForXml07282006005222AM/
MSBuildForXml.aspx?ArticleID=f1f4249b-171b-4cbc-82eb-83da9c1820ad

Hope this also helps.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
 	

This posting is provided "AS IS" with no warranties, and confers no rights.
Date:Tue, 07 Aug 2007 02:59:48 GMT   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us