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 _
)
[C#]
protected WebRequest(
   SerializationInfo serializationInfo,
 StreamingContext streamingContext
);
[C++]
protected: WebRequest(
   SerializationInfo* serializationInfo,
 StreamingContext streamingContext
);
[JScript]
protected function WebRequest(
   serializationInfo : SerializationInfo,
 streamingContext : StreamingContext
);

Parameters

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

Exceptions

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

Remarks

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.

Requirements

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

Show: