FileWebResponse FileWebResponse FileWebResponse FileWebResponse Class

Definition

Provides a file system implementation of the WebResponse class.

public ref class FileWebResponse : System::Net::WebResponse, System::Runtime::Serialization::ISerializable
[Serializable]
public class FileWebResponse : System.Net.WebResponse, System.Runtime.Serialization.ISerializable
type FileWebResponse = class
    inherit WebResponse
    interface ISerializable
Public Class FileWebResponse
Inherits WebResponse
Implements ISerializable
Inheritance
Attributes
SerializableAttribute
Implements

Remarks

The FileWebResponse class implements the WebResponseabstract base class to return file system resources for the FileWebRequest class.

Client applications do not create FileWebResponse instances directly; instead, they are created by calling the GetResponse method on a FileWebRequest instance.

The 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.

Constructors

FileWebResponse(SerializationInfo, StreamingContext) FileWebResponse(SerializationInfo, StreamingContext) FileWebResponse(SerializationInfo, StreamingContext) FileWebResponse(SerializationInfo, StreamingContext)

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

Properties

ContentLength ContentLength ContentLength ContentLength

Gets the length of the content in the file system resource.

ContentType ContentType ContentType ContentType

Gets the content type of the file system resource.

Headers Headers Headers Headers

Gets a collection of header name/value pairs associated with the response.

IsFromCache IsFromCache IsFromCache IsFromCache

Gets a Boolean value that indicates whether this response was obtained from the cache.

(Inherited from WebResponse)
IsMutuallyAuthenticated IsMutuallyAuthenticated IsMutuallyAuthenticated IsMutuallyAuthenticated

Gets a Boolean value that indicates whether mutual authentication occurred.

(Inherited from WebResponse)
ResponseUri ResponseUri ResponseUri ResponseUri

Gets the URI of the file system resource that provided the response.

SupportsHeaders SupportsHeaders SupportsHeaders SupportsHeaders

Gets a value that indicates whether the Headers property is supported by the FileWebResponse instance.

Methods

Close() Close() Close() Close()

Closes the response stream.

CreateObjRef(Type) CreateObjRef(Type) CreateObjRef(Type) CreateObjRef(Type)

Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.

(Inherited from MarshalByRefObject)
Dispose() Dispose() Dispose() Dispose()

Releases the unmanaged resources used by the WebResponse object.

(Inherited from WebResponse)
Dispose(Boolean) Dispose(Boolean) Dispose(Boolean) Dispose(Boolean)
Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetLifetimeService() GetLifetimeService() GetLifetimeService() GetLifetimeService()

Retrieves the current lifetime service object that controls the lifetime policy for this instance.

(Inherited from MarshalByRefObject)
GetObjectData(SerializationInfo, StreamingContext) GetObjectData(SerializationInfo, StreamingContext) GetObjectData(SerializationInfo, StreamingContext) GetObjectData(SerializationInfo, StreamingContext)

Populates a SerializationInfo with the data needed to serialize the target object.

GetResponseStream() GetResponseStream() GetResponseStream() GetResponseStream()

Returns the data stream from the file system resource.

GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
InitializeLifetimeService() InitializeLifetimeService() InitializeLifetimeService() InitializeLifetimeService()

Obtains a lifetime service object to control the lifetime policy for this instance.

(Inherited from MarshalByRefObject)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
MemberwiseClone(Boolean) MemberwiseClone(Boolean) MemberwiseClone(Boolean) MemberwiseClone(Boolean)

Creates a shallow copy of the current MarshalByRefObject object.

(Inherited from MarshalByRefObject)
ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Explicit Interface Implementations

IDisposable.Dispose() IDisposable.Dispose() IDisposable.Dispose() IDisposable.Dispose()
ISerializable.GetObjectData(SerializationInfo, StreamingContext) ISerializable.GetObjectData(SerializationInfo, StreamingContext) ISerializable.GetObjectData(SerializationInfo, StreamingContext) ISerializable.GetObjectData(SerializationInfo, StreamingContext)

Populates a SerializationInfo instance with the data needed to serialize the FileWebResponse.

Applies to