HttpEncoder.Current Property

.NET Framework (current version)
 

Gets or set the HttpEncoder type that will be used in an application.

Namespace:   System.Web.Util
Assembly:  System.Web (in System.Web.dll)

public static HttpEncoder Current { get; set; }

Property Value

Type: System.Web.Util.HttpEncoder

A reference to the encoder/decoder type that will be used.

Exception Condition
ArgumentNullException

The encoder instance that is being assigned to this property is null.

If a derived HttpEncoder type is specified in the configuration file, the Current property returns a reference to the custom type. However, if no custom encoder is used, the property returns a reference to the default ASP.NET HttpEncoder instance.

The Current property is not thread-safe. Set this property only in the application's Application_Start method, because Application_Start runs on a single thread.

.NET Framework
Available since 4.0
Return to top
Show: