Hi all,
I have a web.config on an ASP.Net WCF .Net Framework 4.0, and I have transformations depending on the build environment.
The thing is that I have a diagnostics section inside my system.serviceModel section. On the base web.config this is empty:
<diagnostics></diagnostics>
Then on my transformation, we apply filters which contain namespaces, like this:
<diagnostics performanceCounters="All" xdt:Transform="Replace">
<messageLogging logEntireMessage="true" logMalformedMessages="true" logMessagesAtServiceLevel="true" logMessagesAtTransportLevel="true" maxMessagesToLog="300000" maxSizeOfMessageToLog="200000000">
<filters>
<add xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">/s:Envelope/s:Header/a:Action[contains(.,'IMyService')]</add>
</filters>
</messageLogging>
</diagnostics>
When the transformation is applied (xdt:Transform="Replace"), I get this:
<diagnostics performanceCounters="All">
<messageLogging logEntireMessage="true" logMalformedMessages="true" logMessagesAtServiceLevel="true" logMessagesAtTransportLevel="true"
maxMessagesToLog="300000" maxSizeOfMessageToLog="200000000">
<filters>
<add>/s:Envelope/s:Header/a:Action[contains(.,'IMyService')]</add>
</filters>
</messageLogging>
</diagnostics>
Which causes the web.config to have an Xml error, not working properly.
Resuming, this is the current output on the filter:
<add>/s:Envelope/s:Header/a:Action[contains(.,'IMyService')]</add>
And we would expect it to be like this:
<add xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">/s:Envelope/s:Header/a:Action[contains(.,'IMyService')]</add>
How can I overcome this?