c# - How to change an endpoint address with XML Transformation in web.config? -


i need change address of configuration in web.config:

<client>   <endpoint address="old_address"     binding="basichttpbinding"     contract="service.iservice" name="basichttpbinding_iservice" /> </client> 

to this:

<client>   <endpoint address="new_address"     binding="basichttpbinding"     contract="service.iservice" name="basichttpbinding_iservice" /> </client> 

in xml-transformation file (it's working, changes add key value)
have this:

<configuration xmlns:xdt="http://schemas.microsoft.com/xml-document-transform">   <client>     <endpoint name="basichttpbinding_iservice"       address="new_address"       xdt:transform="setattributes" xdt:locator="match(name)"/>   </client> 

but doesn't work. don't understand why doesn't change, if locate name. help/tip preciated. thanks

does structure of transformation file match web.config? specifically, missing systems.servicemodel element?

<configuration xmlns:xdt="http://schemas.microsoft.com/xml-document-transform">    <system.servicemodel>       <client>          <endpoint name="basichttpbinding_iservice" address="new_address"            xdt:transform="setattributes" xdt:locator="match(name)"/>       </client>    </system.servicemodel> </configuration> 

Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -