This documentation is archived and is not being maintained.

WebRequest Constructor (SerializationInfo, StreamingContext)

.NET Framework 1.1

Initializes a new instance of the WebRequest class from the specified instances of the SerializationInfo and StreamingContext classes.

[Visual Basic]
Protected Sub New( _
   ByVal serializationInfo As SerializationInfo, _
   ByVal streamingContext As StreamingContext _
protected WebRequest(
   SerializationInfo serializationInfo,
 StreamingContext streamingContext
protected: WebRequest(
   SerializationInfo* serializationInfo,
 StreamingContext streamingContext
protected function WebRequest(
   serializationInfo : SerializationInfo,
 streamingContext : StreamingContext


A SerializationInfo that contains the information required to serialize the new WebRequest instance.
A StreamingContext that indicates the source of the serialized stream associated with the new WebRequest instance.


Exception Type Condition
NotSupportedException Any attempt is made to access the constructor, when the constructor is not overridden in a descendant class.


When implemented by a descendant class, this constructor implements the ISerializable interface for the WebRequest descendant.

Notice that an application must run in full trust mode when using serialization.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

WebRequest Class | WebRequest Members | System.Net Namespace | WebRequest Constructor Overload List | XML and SOAP Serialization