【发布时间】:2018-11-20 17:58:31
【问题描述】:
我有两个与我的服务关联的端点地址,我想在我的 Web.Release.config 中更改它们。我之前没有使用过 XML 转换,所以我不确定该怎么做,尤其是在需要更改多个端点地址的情况下。
我在 Stackoverflow 上找到了其他示例,但这些示例的 XML 结构与我的不同。
</configuration>
<system.serviceModel>
<services>
<service behaviorConfiguration="MyService.ServiceBehavior" name="MyService.Documents">
<endpoint name="MyService.Documents.Endpoint"
address="https://MyApp.net/Documents.svc"
behaviorConfiguration="MyService.EndpointBehavior"
binding="webHttpBinding"
bindingConfiguration="TransportSecurity"
contract="MyService.IDocuments" />
</service>
<service behaviorConfiguration="MyService.ServiceBehavior" name="MyService.Leads">
<endpoint name="MyService.Leads.Endpoint"
address="https://MyApp.net/Leads.svc"
behaviorConfiguration="MyService.EndpointBehavior"
binding="webHttpBinding"
bindingConfiguration="TransportSecurity"
contract="MyService.ILeads" />
</service>
</services>
</system.serviceModel>
</configuration>
https://MyApp.net/Documents.svc和https://MyApp.net/Leads.svc这两个端点地址是我需要改的。
【问题讨论】:
标签: xml visual-studio xslt transformation