.NET Framework (current version)

This section registers a new standard endpoint in the extensions section in a machine or application configuration file. You can add a standard endpoint to this collection by using the add keyword, and setting the type attribute of the element to the endpoint type, as well as the name attribute to the name of the standard endpoint.

The following example uses the add element, as well as the name attribute to add a standard endpoint to the <endpointExtensions> section of the configuration file.

           <add name="udpDiscoveryEndpoint"
                type="System.Discovery.UdpEndpointCollectionElement, System.Discovery.dll, Version=, Culture=neutral, PublicKeyToken=ffffffffffffffff"/>

After the standard endpoint has been registered, you can use it as shown in the following example. In the <endpoint> element element, the kind attribute specifies the standard endpoint type that has been registered in the <endpointExtensions> section. The endpointConfiguration attribute will be identical to the name attribute of the configuration element of the standard endpoint in the <standardEndpoints>  section.

      <service name="Service1">
        <endpoint kind="udpDiscoveryEndpoint"
                  endpointConfiguration="udpConfig" />
                  ... />