Type Reason ArgumentNullException name is null or string.Empty. ArgumentException name contains invalid characters.
-or-
name is a protected header that can only be set with a property accessor or by the system.
WebHeaderCollection.Remove(HttpRequestHeader) deletes the specified header from the collection. If the specified header does not exist, the method returns.