Hi,
This is not an Octopus question, but struggling with this all morning and wondered if someone could give me a hand with this transform.
I have several endpoint definitions like this in a config file:
<client>
<endpoint address="http://localhost/Service/MyService.svc"
binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IMyService"
contract="MyService.IProcess" name="MyService">
<identity>
<servicePrincipalName value="host/localhost" />
</identity>
</endpoint>
I wish to transform to this:
<client>
<endpoint address="http://#{ServiceURL}/Service/MyService.svc"
binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IMyService"
contract="MyService.IProcess" name="MyService">
<identity>
<servicePrincipalName value="host/#{ServiceFQDN}" />
</identity>
</endpoint>
Has anyone got any similar transforms they are willing to share that may help me with this? The transforms I have tried so far aren’t doing anything when using the transform test tools I’m using.
Thanks,
Andrew.
Dalmiro
(Dalmiro Grañas)
14 December 2015 18:16
#2
Hi Andrew,
Thanks for getting in touch. Not an Octopus question, but we can give you a hand with it
Here’s an example I tested using AppHarbor’s web.config transformation tester
Web.config
<?xml version="1.0" encoding="utf-8"?>
<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<endpoint address="http://localhost/Service/MyService.svc" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IMyService" contract="MyService.IProcess" name="MyService">
<identity>
<servicePrincipalName value="host/localhost" />
</identity>
</endpoint>
</configuration>
web.transform.config
<?xml version="1.0" encoding="utf-8"?>
<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<endpoint address="http://#{ServiceURL}/Service/MyService.svc" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IMyService" contract="MyService.IProcess" name="MyService" xdt:Transform="Replace">
<identity>
<servicePrincipalName value="host/#{ServiceFQDN}" xdt:Transform="Replace" />
</identity>
</endpoint>
</configuration>
Hope that helps!
Dalmiro