Reputation: 11
We use xmlupdate to make changes to our web.config in our test environment. This works successfully when we're just updating the value of the node. We're wanting to turn OFF customErrors in our test environment and are unsure how to do this using xmlupdate because it's not simply a value within the node; it's within the key tag.
<customErrors mode="RemoteOnly" redirectMode="ResponseRewrite">
needs to become
<customErrors mode="Off" redirectMode="ResponseRewrite">
-----------------This is an example of what we use successfully.
<XmlUpdate
XmlFileName="%(Codebase.Path)\imod.net_fw2\Web.config"
Xpath="//configuration/appSettings/add[@key='TrackingConnString']/@value"
Value="$(TrackingConnStr)"
Condition ="'%(Codebase.Path)'!=''"
/>
Thank you!
Upvotes: 1
Views: 352