<extensions>
這個組態項目包含 XML 項目的集合,這些項目包含要與標準可探索中繼資料 (EPR、ContractTypeName、BindingName、Scope 與 ListenURI) 一併發行的 XML 項目集合。 以下是使用這個組態項目的範例。
<services>
<service name="CalculatorService"
behaviorConfiguration="CalculatorServiceBehavior">
<endpoint binding="basicHttpBinding"
address="calculator"
contract="ICalculatorService"
behaviorConfiguration="calculatorEndpointBehavior" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="CalculatorServiceBehavior">
<serviceDiscovery />
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="calculatorEndpointBehavior">
<endpointDiscovery enable="true">
<extensions>
<e:Publisher xmlns:e="http://example.org">
<e:Name>The Example Organization</e:Name>
<e:Address>One Example Way, ExampleTown, EX 12345</e:Address>
<e:Contact>support@example.org</e:Contact>
</e:Publisher>
<AnotherCustomMetadata>Custom Metadata</AnotherCustomMetadata>
</extensions>
</endpointDiscovery>
</behavior>
</endpointBehaviors>
</behaviors>