Table of Contents

Class WebHttpRelayBinding

Namespace
Microsoft.ServiceBus
Assembly
Microsoft.ServiceBus.dll

A binding used to configure endpoints for Web services that are exposed through HTTP requests instead of SOAP messages.

public class WebHttpRelayBinding : Binding, IBindingRuntimePreferences
Inheritance
WebHttpRelayBinding
Implements
IBindingRuntimePreferences

Constructors

WebHttpRelayBinding()

Initializes a new instance of the WebHttpRelayBinding class.

public WebHttpRelayBinding()

WebHttpRelayBinding(EndToEndWebHttpSecurityMode, RelayClientAuthenticationType)

Initializes a new instance of the WebHttpRelayBinding class using the specified type of security and relay client authentication.

public WebHttpRelayBinding(EndToEndWebHttpSecurityMode securityMode, RelayClientAuthenticationType relayClientAuthenticationType)

Parameters

securityMode EndToEndWebHttpSecurityMode

The type of security used with the binding.

relayClientAuthenticationType RelayClientAuthenticationType

The type of client authentication used on the relay.

WebHttpRelayBinding(string)

Initializes a new instance of the WebHttpRelayBinding class using the specified configuration name.

public WebHttpRelayBinding(string configurationName)

Parameters

configurationName string

The configuration to use.

Properties

AllowCookies

Gets or sets a value that specifies whether cookies are allowed in the messages sent via the WebHttpRelayBinding.

public bool AllowCookies { get; set; }

Property Value

bool

Returns true if cookies are allowed; otherwise, false. The default value is false.

ContentTypeMapper

Gets or sets the content type mapper.

public WebContentTypeMapper ContentTypeMapper { get; set; }

Property Value

WebContentTypeMapper

The content type mapper.

EnvelopeVersion

Gets the SOAP envelope version.

public EnvelopeVersion EnvelopeVersion { get; }

Property Value

EnvelopeVersion

Returns a System.ServiceModel.EnvelopeVersion. Since the WebHttpRelayBinding does not use SOAP, this always returns EnvelopeVersion.None.WebHttpRelayBinding is not likely the binding you should be using for SOAP messaging. However, Windows Azure Service Bus does support SOAP.

HostNameComparisonMode

Gets or sets the comparison mode used on the host name.

public HostNameComparisonMode HostNameComparisonMode { get; set; }

Property Value

HostNameComparisonMode

The comparison mode used on the host name.

IsDynamic

Gets or sets whether the relay binding is dynamic.

public bool IsDynamic { get; set; }

Property Value

bool

true if the relay binding is dynamic; otherwise, false.

MaxBufferPoolSize

Gets or sets the maximum buffer pool size used by the transport.

public long MaxBufferPoolSize { get; set; }

Property Value

long

Returns the maximum buffer pool size. The default is 524288 bytes.

MaxBufferSize

Gets or sets the maximum buffer size supported by the transport.

public int MaxBufferSize { get; set; }

Property Value

int

Returns the max buffer size.

MaxReceivedMessageSize

Gets or sets the maximum allowable message size that can be received.

public long MaxReceivedMessageSize { get; set; }

Property Value

long

Returns the maximum allowable message size. The default size is 65,536 bytes.

ProxyAddress

Gets or sets a URI that contains the address of the proxy to use for HTTP requests.

public Uri ProxyAddress { get; set; }

Property Value

Uri

Returns a System.Uri that contains the address of the proxy to use for HTTP requests. The default value is null.

ReaderQuotas

Gets or sets xml reader quotas on the messages processed.

public XmlDictionaryReaderQuotas ReaderQuotas { get; set; }

Property Value

XmlDictionaryReaderQuotas

Returns a System.Xml.XmlDictionaryReaderQuotas that contains the reader quotas.

Scheme

Gets the scheme for the endpoints used with the binding.

public override string Scheme { get; }

Property Value

string

Returns the scheme.

Security

Gets the security settings for the current instance.

public WebHttpRelaySecurity Security { get; }

Property Value

WebHttpRelaySecurity

Returns a WebHttpRelaySecurity that contains the security settings.

TransferMode

Gets or sets the transfer mode.

public TransferMode TransferMode { get; set; }

Property Value

TransferMode

Returns a System.ServiceModel.TransferMode that contains the transfer mode. The default is Buffered.

UseDefaultWebProxy

Gets or sets a value that indicates whether the machine-wide proxy settings are used rather than the user specific settings.

public bool UseDefaultWebProxy { get; set; }

Property Value

bool

true if machine-wide proxy settings are used. Otherwise false. The default setting is true.

WriteEncoding

Gets or sets the character encoding that is used to write the message text.

public Encoding WriteEncoding { get; set; }

Property Value

Encoding

Returns a Encoding that contains the encoding. The default value is utf8encoding.

Methods

CreateBindingElements()

Creates a collection with the binding elements for the binding.

public override BindingElementCollection CreateBindingElements()

Returns

BindingElementCollection

Returns a System.ServiceModel.Channels.BindingElementCollection that contains the ordered stack of binding elements used by the WebHttpRelayBinding.