I want to use the VS2010 web.config conversion function, but I'm not sure about XPath, which I should use to replace a specific value.
I have the following client service endpoint defined:
<client> <endpoint name="IMyService" address="net.tcp://xxxx:xx/MySvc" binding="netTcpBinding" bindingConfiguration="..." contract="..." > <identity> <servicePrincipalName value="host/testMachine.domain.com" /> </identity> </endpoint> </client>
I want to replace servicePrincipalName node with the following value.
<servicePrincipalName value="host/productionMachine.domain.com" />
Since multiple client endpoints can be defined, I prefer to use XPath, which identifies the specific node endpoint (in this case, where name = "IMyService").
So, in the pseudo code, I need to do this:
<servicePrincipalName value="host/productionMachine.domain.com" xdt:Transform="Replace" xdt:Locator="Condition([containing endpoint node] @name='IMyService')" />
Can someone tell me what should happen where these square brackets are enclosed, or show me some other funky way to replace this particular node?
source share