[Serializable] |
Client applications do not create FileWebResponse instances directly; instead, they are created by calling the FileWebRequest.GetResponse method on a FileWebRequest instance.
The FileWebResponse.GetResponseStream method returns a Stream instance that provides read-only access to a file system resource.
The FileWebResponse class relies on the File class for error handling and code access security.
ContentLength | Read-only Overridden: Gets the length of the content in the file system resource. |
ContentType | Read-only Overridden: Gets the content type of the file system resource. |
Headers | Read-only Overridden: Gets a collection of header name/value pairs associated with the response. |
ResponseUri | Read-only Overridden: Gets the URI of the file system resource that provided the response. |
Close | Overridden: Closes the response stream. |
CreateObjRef (inherited from System.MarshalByRefObject) |
See base class member description: System.MarshalByRefObject.CreateObjRef Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. |
Equals (inherited from System.Object) |
See base class member description: System.Object.Equals Derived from System.Object, the primary base class for all objects. |
GetHashCode (inherited from System.Object) |
See base class member description: System.Object.GetHashCode Derived from System.Object, the primary base class for all objects. |
GetLifetimeService (inherited from System.MarshalByRefObject) |
See base class member description: System.MarshalByRefObject.GetLifetimeService Retrieves the current lifetime service object that controls the lifetime policy for this instance. |
GetResponseStream | Overridden: Returns the data stream from the file system resource. |
GetType (inherited from System.Object) |
See base class member description: System.Object.GetType Derived from System.Object, the primary base class for all objects. |
InitializeLifetimeService (inherited from System.MarshalByRefObject) |
See base class member description: System.MarshalByRefObject.InitializeLifetimeService Obtains a lifetime service object to control the lifetime policy for this instance. |
ToString (inherited from System.Object) |
See base class member description: System.Object.ToString Derived from System.Object, the primary base class for all objects. |
ctor #1 | Initializes a new instance of the FileWebResponse class from the specified instances of the SerializationInfo and StreamingContext classes. |
Dispose | Releases the unmanaged resources used by the FileWebResponse and optionally releases the managed resources. |
Finalize (inherited from System.Object) |
See base class member description: System.Object.Finalize Derived from System.Object, the primary base class for all objects. |
MemberwiseClone (inherited from System.Object) |
See base class member description: System.Object.MemberwiseClone Derived from System.Object, the primary base class for all objects. |
Hierarchy:
protected FileWebResponse( |
serializationInfo
streamingContext
public override long ContentLength {get;}
|
public override string ContentType {get;}
|
public override WebHeaderCollection Headers {get;}
|
public override Uri ResponseUri {get;}
|
public override void Close(); |
requestedType
Exception Type | Condition |
---|---|
RemotingException | This instance is not a valid remoting object. |
protected virtual void Dispose( |
disposing
When the disposing parameter is true, this method releases all resources held by any managed objects that this FileWebResponse references. This method invokes the Dispose() method of each referenced object.
For more information about Dispose and Object.Finalize, see the conceptual topic at MSDN: cleaningupunmanagedresources and the conceptual topic at MSDN: overridingfinalizemethod.
~FileWebResponse(); |
public virtual int GetHashCode(); |
public object GetLifetimeService(); |
public override Stream GetResponseStream(); |
public Type GetType(); |
public virtual object InitializeLifetimeService(); |
public class MyClass : MarshalByRefObject { public override Object InitializeLifetimeService() { ILease lease = (ILease)base.InitializeLifetimeService(); if (lease.CurrentState == LeaseState.Initial) { lease.InitialLeaseTime = TimeSpan.FromMinutes(1); lease.SponsorshipTimeout = TimeSpan.FromMinutes(2); lease.RenewOnCallTime = TimeSpan.FromSeconds(2); } return lease; } }
protected object MemberwiseClone(); |
public virtual string ToString(); |