System.ServiceModel 4.0.0.0 System.Object System.ServiceModel.Description.IServiceBehavior

Add a object to the collection (or the <serviceMetadata> element in an application configuration file) to enable or disable the publication of service metadata. However, adding the behavior to a service is not sufficient to enable metadata publication:

To enable WS-Transfer GET metadata retrieval, you must also add an endpoint to your service in which the contract is IMetadataExchange. For an example, see How To: Publish Metadata for a Service Using Code. The IMetadataExchange endpoint can be configured as can any other endpoint.

To enable HTTP GET metadata retrieval, set the property to true. crabout the address of HTTP GET metadata, see .

The address of the IMetadataExchange endpoint follows the normal rules regarding the combination of base addresses and endpoint addresses. crdefault Publishing Metadata.

To enable the publication of metadata using a configuration file, add the <serviceMetadata> element to the <serviceBehaviors> element and associate the element with the <service> element for which you want to publish metadata. For an example, see How to: Publish Metadata for a Service Using a Configuration File. The class has the following members:

The property specifies whether metadata is returned for HTTP/GET requests.

The property (in conjunction with the base addresses) specifies the HTTP/GET address.

The property specifies whether metadata is returned for an HTTPS/GET request.

The property (in conjunction with the base addresses) specifies the HTTPS/GET address.

The property returns the underlying exporter.

Typically the is used from an application configuration file. See the Example section for a code example.

Controls the publication of service metadata and associated information.

- Constructor
  4.0.0.0

  Creates a with the following values:

  The property is false.

  The property is false.

  Initializes a new instance of the class.

- Property
  4.0.0.0
  System.Uri To be added.

  Returns a reference to an external metadata location to clients. The property can be relative or absolute. If relative, the address is resolved by the client relative to the or , depending on how the client retrieved the metadata.

  Gets or sets a value that is the location of service metadata.

- Property
  4.0.0.0
  System.ServiceModel.Channels.Binding To be added.

  In previous versions of WCF, metadata retrieval was accomplished using HTTP GET to access the service help page through a web browser. Only the was supported. For metadata retrieval using HTTPS GET, only the was supported. The HttpGetBinding and HttpsGetBinding properties enable the usage of bindings for metadata retrieval using HTTP GET (or HTTPS GET) and the bindings used to access service web pages to be configurable, either programmatically or through configuration files.

  For more information about retrieving help pages, use the and properties.

  Gets or sets a binding used to configure metadata retrieval when the transport is HTTP.

- Property
  4.0.0.0
  System.Boolean To be added.

  If the value of is relative, the address at which the metadata is published is the base address and the service address plus a ?wsdl querystring.

  If the value of is absolute the address at which the metadata is published is the value of value plus a ?wsdl querystring.

  For example, if the service address is http://localhost:8080/CalculatorService and the is an empty string, the HTTP/GET metadata address is http://localhost:8080/CalculatorService?wsdl.

  If you do not enable this property and do not change or set it to a relative address, an exception is thrown at runtime when the service host is opened without a base address for HTTP.

  Gets or sets a value that indicates whether to publish service metadata for retrieval using an HTTP/GET request.

- Property
  4.0.0.0
  System.Uri To be added.

  If the value of is relative, the address at which the metadata is published is the base address and the service address plus a ?wsdl querystring.

  If the value of is absolute the address at which the metadata is published is this value plus a ?wsdl querystring.

  For example, if the service address is http://localhost:8080/CalculatorService and the is an empty string, the HTTP/GET metadata address is http://localhost:8080/CalculatorService?wsdl.

  Gets or sets the location of metadata publication for HTTP/GET requests.

- Property
  4.0.0.0
  System.ServiceModel.Channels.Binding To be added.

  In previous versions of WCF, metadata retrieval was accomplished using HTTP GET to access the service help page through a web browser. Only the was supported. For metadata retrieval using HTTPS GET, only the was supported. The HttpGetBinding and HttpsGetBinding properties enable the usage of bindings for metadata retrieval using HTTP GET (or HTTPS GET) and the bindings used to access service web pages to be configurable, either programmatically or through configuration files.

  For more information about retrieving help pages, use the and properties.

  Gets or sets a binding used to configure metadata retrieval when the transport is HTTPS.

- Property
  4.0.0.0
  System.Boolean To be added.

  If the value of is relative, the address at which the metadata is published is the base address and the service address plus a ?wsdl querystring.

  If the value of is absolute the address at which the metadata is published is the value of value plus a ?wsdl querystring.

  For example, if the service address is https://localhost:8080/CalculatorService and the is an empty string, the HTTPS/GET metadata address is https://localhost:8080/CalculatorService?wsdl.

  Gets or sets a value that indicates whether to publish service metadata for retrieval using an HTTPS/GET request.

- Property
  4.0.0.0
  System.Uri To be added.

  If the value of is relative, the address at which the metadata is published is the base address and the service address plus a ?wsdl querystring.

  If the value of is absolute the address at which the metadata is published is the value of value plus a ?wsdl querystring.

  For example, if the service address is https://localhost:8080/CalculatorService and the is an empty string, the HTTPS/GET metadata address is https://localhost:8080/CalculatorService?wsdl.

  Gets or sets the location of metadata publication for HTTPS/GET requests.

- Property
  4.0.0.0
  System.ServiceModel.Description.MetadataExporter To be added.

  Use the object to modify the publication of the service metadata.

  Gets or sets the internal object used to publish the service metadata.

- Field
  4.0.0.0
  System.String To be added.

  Returns the string IMetadataContract.

- Method
  4.0.0.0
  System.Void `` `` `` `` To be added.

  Implementation of that configures the underlying bindings to support the behavior.

  The service description to be configured. The host of the service. The endpoints to be configured. The binding parameters to be configured.
- Method
  4.0.0.0
  System.Void `` `` To be added.

  Implementation of that configures the underlying bindings to support the behavior on the service.

  The service description to be modified. The host of the service.
- Method
  4.0.0.0
  System.Void `` `` To be added.

  Implementation of that validates that the service description can support the behavior.

  The service description to be validated. The host of the service.