This documentation is archived and is not being maintained.

ServiceMetadataBehavior.HttpGetUrl Property

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

Namespace: System.ServiceModel.Description
Assembly: System.ServiceModel (in system.servicemodel.dll)

public Uri HttpGetUrl { get; set; }
/** @property */
public Uri get_HttpGetUrl ()

/** @property */
public void set_HttpGetUrl (Uri value)

public function get HttpGetUrl () : Uri

public function set HttpGetUrl (value : Uri)

Not applicable.

Property Value

The absolute or relative location of the metadata.

If the value of HttpGetUrl 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 HttpGetUrl 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 HttpGetUrl is an empty string, the HTTP/GET metadata address is http://localhost:8080/CalculatorService?wsdl.

The following code example demonstrates the use of ServiceMetadataBehavior in a configuration file to enable metadata support for HTTP/GET and WS-Transfer/GET requests.

            <add baseAddress="http://localhost:8080/SampleService" />
        <!-- Adds a WS-MetadataExchange endpoint at -->
        <!-- "http://localhost:8080/SampleService/mex" -->
      <behavior name="metadataSupport">
        <!-- Enables the IMetadataExchange endpoint in services that -->
        <!-- use "metadataSupport" in their behaviorConfiguration attribute. -->
        <!-- In addition, the httpGetEnabled and httpGetUrl attributes publish -->
        <!-- Service metadata for retrieval by HTTP/GET at the address -->
        <!-- "http://localhost:8080/SampleService?wsdl" -->
        <serviceMetadata httpGetEnabled="true" httpGetUrl=""/>

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0