Table of Contents

Class WebHttpRelayBindingElement

Namespace
Microsoft.ServiceBus.Configuration
Assembly
Microsoft.ServiceBus.dll

A binding element used to configure endpoints for an Azure Service Bus relay service that responds to HTTP requests instead of SOAP messages.

public class WebHttpRelayBindingElement : StandardBindingElement
Inheritance
WebHttpRelayBindingElement

Constructors

WebHttpRelayBindingElement()

Initializes a new instance of the WebHttpRelayBindingElement class.

public WebHttpRelayBindingElement()

WebHttpRelayBindingElement(string)

Initializes a new instance of the WebHttpRelayBindingElement class using the specified name.

public WebHttpRelayBindingElement(string name)

Parameters

name string

The name of the new binding element.

Properties

AllowCookies

Gets or sets a value that indicates whether the client accepts cookies and propagates them on future requests.

public bool AllowCookies { get; set; }

Property Value

bool

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

BindingElementType

Gets the type of binding that this configuration element represents.

protected override Type BindingElementType { get; }

Property Value

Type

Returns a Type that contains the binding type.

IsDynamic

Gets or sets whether the binding element is dynamic.

public bool IsDynamic { get; set; }

Property Value

bool

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

MaxBufferPoolSize

Gets or sets the maximum amount of memory allocated for the buffer manager that manages the buffers required by endpoints that use this binding.

public long MaxBufferPoolSize { get; set; }

Property Value

long

Returns the maximum size, in bytes, for the pool of buffers used by an endpoint configured with this binding. The default value is 65,536 bytes.

MaxBufferSize

Gets or sets the maximum amount of memory that is allocated for use by the manager of the message buffers that receive messages from the channel.

public int MaxBufferSize { get; set; }

Property Value

int

Returns the maximum amount of memory, in bytes, available for use by the message buffer manager. The default value is 524,288 (0x80000) bytes.

Exceptions

ArgumentOutOfRangeException

The value set is less than or equal to zero.

MaxReceivedMessageSize

Gets or sets the maximum size for a message that can be processed by the binding.

public long MaxReceivedMessageSize { get; set; }

Property Value

long

Returns the maximum size, in bytes, for a message that is processed by the binding. The default value is 65,536 bytes.

Exceptions

ArgumentOutOfRangeException

The value is less than zero.

Properties

Gets a collection of objects that can be attributes or configuration element objects of this configuration element.

protected override ConfigurationPropertyCollection Properties { get; }

Property Value

ConfigurationPropertyCollection

Returns a System.Configuration.ConfigurationPropertyCollection that contains a collection of ConfigurationProperty objects that can be attributes or ConfigurationElement objects on this configuration element.

ProxyAddress

Gets or sets the URI address of the HTTP proxy.

public Uri ProxyAddress { get; set; }

Property Value

Uri

Returns a System.Uri that serves as the address of the HTTP proxy. The default value is null.

ReaderQuotas

Gets or sets the configuration element that contains the constraints on the complexity of SOAP messages that can be processed by endpoints configured with this binding.

public XmlDictionaryReaderQuotasElement ReaderQuotas { get; }

Property Value

XmlDictionaryReaderQuotasElement

Returns an XmlDictionaryReaderQuotasElement that contains the complexity restraints.

Exceptions

ArgumentNullException

The valueset is null.

ArgumentOutOfRangeException

The quota values of XmlDictionaryReaderQuotas are read only.

ArgumentException

The quotas set must be positive.

Security

Gets the configuration element that contains the security settings used with this binding.

public WebHttpRelaySecurityElement Security { get; }

Property Value

WebHttpRelaySecurityElement

Returns a WebHttpRelaySecurityElement that contains the security settings for this binding. The default value is none.

TransferMode

Gets or sets a value that indicates whether the service configured with the associated binding uses streamed or buffered (or both) modes of message transfer.

public TransferMode TransferMode { get; set; }

Property Value

TransferMode

Returns a System.ServiceModel.TransferMode that contains indicates whether the service configured with the binding uses streamed or buffered (or both) modes of message transfer. The default value is Buffered.

Exceptions

InvalidEnumArgumentException

The value set is not a valid TransferMode value.

UseDefaultWebProxy

Gets or sets a value that indicates whether the auto-configured HTTP proxy of the system should be used with the associated binding, if available.

public bool UseDefaultWebProxy { get; set; }

Property Value

bool

true if the auto-configured HTTP proxy of the system should be used, if available; otherwise, false. The default value is true.

WriteEncoding

Gets or sets the character encoding that is used for the message text in the associated binding.

[TypeConverter(typeof(EncodingConverter))]
public Encoding WriteEncoding { get; set; }

Property Value

Encoding

Returns a Encoding that indicates the character encoding that is used. The default is UTF8Encoding.

Exceptions

ArgumentNullException

The value set is null.

Methods

InitializeFrom(Binding)

Initializes the contents of this binding configuration element from the property values of a specified binding.

protected override void InitializeFrom(Binding binding)

Parameters

binding Binding

The binding to update this configuration element from.

OnApplyConfiguration(Binding)

Applies the settings of this configuration element to the specified binding.

protected override void OnApplyConfiguration(Binding binding)

Parameters

binding Binding

The binding to update the settings of.