FileWebResponse Class

 

Provides a file system implementation of the WebResponse class.

Namespace:   System.Net
Assembly:  System (in System.dll)

System.Object
  System.MarshalByRefObject
    System.Net.WebResponse
      System.Net.FileWebResponse

[SerializableAttribute]
public class FileWebResponse : WebResponse, ISerializable

NameDescription
System_CAPS_protmethodFileWebResponse(SerializationInfo, StreamingContext)

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

NameDescription
System_CAPS_pubpropertyContentLength

Gets the length of the content in the file system resource.(Overrides WebResponse.ContentLength.)

System_CAPS_pubpropertyContentType

Gets the content type of the file system resource.(Overrides WebResponse.ContentType.)

System_CAPS_pubpropertyHeaders

Gets a collection of header name/value pairs associated with the response.(Overrides WebResponse.Headers.)

System_CAPS_pubpropertyIsFromCache

Gets a Boolean value that indicates whether this response was obtained from the cache.(Inherited from WebResponse.)

System_CAPS_pubpropertyIsMutuallyAuthenticated

Gets a Boolean value that indicates whether mutual authentication occurred.(Inherited from WebResponse.)

System_CAPS_pubpropertyResponseUri

Gets the URI of the file system resource that provided the response.(Overrides WebResponse.ResponseUri.)

System_CAPS_pubpropertySupportsHeaders

Gets a value that indicates whether the Headers property is supported by the FileWebResponse instance.(Overrides WebResponse.SupportsHeaders.)

NameDescription
System_CAPS_pubmethodClose()

Closes the response stream.(Overrides WebResponse.Close().)

System_CAPS_pubmethodCreateObjRef(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.)

System_CAPS_pubmethodDispose()

Releases the unmanaged resources used by the WebResponse object.(Inherited from WebResponse.)

System_CAPS_protmethodDispose(Boolean)

Releases the unmanaged resources used by the WebResponse object, and optionally disposes of the managed resources.(Inherited from WebResponse.)

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetLifetimeService()

Retrieves the current lifetime service object that controls the lifetime policy for this instance.(Inherited from MarshalByRefObject.)

System_CAPS_protmethodGetObjectData(SerializationInfo, StreamingContext)

Populates a SerializationInfo with the data needed to serialize the target object.(Overrides WebResponse.GetObjectData(SerializationInfo, StreamingContext).)

System_CAPS_pubmethodGetResponseStream()

Returns the data stream from the file system resource.(Overrides WebResponse.GetResponseStream().)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodInitializeLifetimeService()

Obtains a lifetime service object to control the lifetime policy for this instance.(Inherited from MarshalByRefObject.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone(Boolean)

Creates a shallow copy of the current MarshalByRefObject object.(Inherited from MarshalByRefObject.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_privmethodISerializable.GetObjectData(SerializationInfo, StreamingContext)

This API supports the product infrastructure and is not intended to be used directly from your code. Populates a SerializationInfo instance with the data needed to serialize the FileWebResponse.

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.

.NET Framework
Available since 1.1

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: