System.Net.WebHeaderCollection.AddWithoutValidate Method

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

Syntax

protected void AddWithoutValidate (string headerName, string headerValue)

Parameters

headerName
The header to add to the collection.
headerValue
The content of the header.

Exceptions

TypeReason
ArgumentException

headerName is null or string.Empty, or contains invalid characters.

-or-

headerValue contains invalid characters.

Remarks

The WebHeaderCollection.AddWithoutValidate(string, string) method adds a header to the collection without checking whether the header is on the restricted header list.

Requirements

Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0