ערוך

שתף באמצעות


WebMessageEncodingBindingElement Constructors

Definition

Initializes a new instance of the WebMessageEncodingBindingElement class.

Overloads

WebMessageEncodingBindingElement()

Initializes a new instance of the WebMessageEncodingBindingElement class.

WebMessageEncodingBindingElement(Encoding)

Initializes a new instance of the WebMessageEncodingBindingElement class with a specified write character encoding.

WebMessageEncodingBindingElement()

Initializes a new instance of the WebMessageEncodingBindingElement class.

public:
 WebMessageEncodingBindingElement();
public WebMessageEncodingBindingElement ();
Public Sub New ()

Remarks

This constructor uses UTF8Encoding as the default character encoding. So use this constructor when you want this character encoding. If you want another character encoding, use the WebMessageEncodingBindingElement(Encoding) constructor.

This constructor sets default values on the maximum number of readers and writers that are allocated to pools and that are respectively available to process incoming and outgoing messages without allocating new readers or writers. There are 64 readers allocated by default for the MaxReadPoolSize property and there are 16 writers allocated by default for the MaxWritePoolSize property.

Default complexity constraints are also set by this constructor on the XmlDictionaryReaderQuotas associated with this message encoding by the ReaderQuotas property to protect against a class of denial of service (DOS) attacks that attempt to use message complexity to tie up endpoint processing resources. The properties that express these constraints and their default values (in bytes) are as follows:

Applies to

WebMessageEncodingBindingElement(Encoding)

Initializes a new instance of the WebMessageEncodingBindingElement class with a specified write character encoding.

public:
 WebMessageEncodingBindingElement(System::Text::Encoding ^ writeEncoding);
public WebMessageEncodingBindingElement (System.Text.Encoding writeEncoding);
new System.ServiceModel.Channels.WebMessageEncodingBindingElement : System.Text.Encoding -> System.ServiceModel.Channels.WebMessageEncodingBindingElement
Public Sub New (writeEncoding As Encoding)

Parameters

writeEncoding
Encoding

The Encoding to be used to write characters in a message.

Exceptions

writeEncoding is null.

writeEncoding is not a supported message text encoding.

Remarks

The message text encodings supported are UTF-8, Unicode, and Big-Endian Unicode. If another text encoding is specified, an ArgumentException is thrown.

This constructor sets default values on the maximum number of readers and writers that are allocated to pools and that are respectively available to process incoming and outgoing messages without allocating new readers or writers. There are 64 readers allocated by default for the MaxReadPoolSize property and there are 16 writers allocated by default for the MaxWritePoolSize property.

Default complexity constraints are also set by this constructor on the XmlDictionaryReaderQuotas associated with this message encoding by the ReaderQuotas property to protect against a class of denial of service (DOS) attacks that attempt to use message complexity to tie up endpoint processing resources. The properties that express these constraints and their default values (in bytes) are as follows:

Applies to