WebHeaderCollection.AddWithoutValidate(String, String) WebHeaderCollection.AddWithoutValidate(String, String) WebHeaderCollection.AddWithoutValidate(String, String) WebHeaderCollection.AddWithoutValidate(String, String) Method

Definition

Inserts a header into the collection without checking whether the header is on the restricted header list.

protected:
 void AddWithoutValidate(System::String ^ headerName, System::String ^ headerValue);
protected void AddWithoutValidate (string headerName, string headerValue);
member this.AddWithoutValidate : string * string -> unit
Protected Sub AddWithoutValidate (headerName As String, headerValue As String)

Parameters

headerName
String String String String

The header to add to the collection.

headerValue
String String String String

The content of the header.

Exceptions

headerName is null, Empty, or contains invalid characters.

-or-

headerValue contains invalid characters.

headerName is not null and the length of headerValue is too long (greater than 65,535 characters).

Remarks

The AddWithoutValidate method adds a header to the collection without checking whether the header is on the restricted header list.

Notes to Inheritors

Use the AddWithoutValidate(String, String) method to add headers that are normally exposed through properties.

Applies to