This documentation is archived and is not being maintained.

WebMessageEncodingBindingElement.CreateMessageEncoderFactory Method

Creates a message encoder factory that produces message encoders that can write either JavaScript Object Notation (JSON) or XML messages.

Namespace:  System.ServiceModel.Channels
Assembly:  System.ServiceModel.Web (in System.ServiceModel.Web.dll)

public override MessageEncoderFactory CreateMessageEncoderFactory()

Return Value

Type: System.ServiceModel.Channels.MessageEncoderFactory
The MessageEncoderFactory that encodes JSON, XML or "raw" binary messages.

The value of the WriteEncoding property determines the character encoding used to write the message.

The maximum number of readers and writers that are allocated to pools and that is respectively available to process incoming and outgoing messages without allocating new readers are specified by the MaxReadPoolSize and MaxWritePoolSize properties.

The default complexity constraints that are used by the message encoders produced by the MessageEncoderFactory can be obtained from the XmlDictionaryReaderQuotas associated with this 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.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5