我有 web.base.config 的以下部分:
<system.serviceModel>
<client>
<!-- Reporting Services -->
<endpoint name="ReportExecutionEndpoint" address="http://~MACHINENAMEREPLACEMENTTOKEN~/ReportServer/ReportExecution2005.asmx" binding="basicHttpBinding" behaviorConfiguration="AuthenticatedBehavior" bindingConfiguration="ReportingServicesConfiguration" contract="ReportingWebService.ReportExecutionServiceSoap" />
<!-- Custom Services -->
<endpoint name="Blah1Endpoint" address="net.tcp://~MACHINENAMEREPLACEMENTTOKEN~/DomainServices/blah1.svc" binding="netTcpBinding" behaviorConfiguration="AuthenticatedBehavior" bindingConfiguration="LargerMessagesConfiguration" contract="Fully.Qualified.IBlah1" />
<endpoint name="Blah2Endpoint" address="net.tcp://~MACHINENAMEREPLACEMENTTOKEN~/DomainServices/blah2.svc" binding="netTcpBinding" behaviorConfiguration="AuthenticatedBehavior" bindingConfiguration="LargerMessagesConfiguration" contract="Fully.Qualified.IBlah2" />
<endpoint name="Blah3Endpoint" address="net.tcp://~MACHINENAMEREPLACEMENTTOKEN~/DomainServices/blah3.svc" binding="netTcpBinding" behaviorConfiguration="AuthenticatedBehavior" bindingConfiguration="LargerMessagesConfiguration" contract="Fully.Qualified.IBlah3" />
</client>
</system.serviceModel>
我想<identity><dns /></identity>
为所有CustomServices添加一个 in,但不是ReportingServices。为此,我有以下转换段:
<system.serviceModel>
<client>
<endpoint xdt:Locator="Condition(contains(@address, 'net.tcp'))">
<identity xdt:Transform="Insert">
<dns value="~MACHINENAMEREPLACEMENTTOKEN~" />
</identity>
</endpoint>
</client>
</system.serviceModel>
问题在于,这仅适用于第一个 CustomService而不是所有其他的(尽管它正确地跳过了ReportingServices)。如何更改此转换以使其到达我的所有CustomServices端点?