FileWebRequest.BeginGetResponse Method (AsyncCallback, Object)

 

Begins an asynchronous request for a file system resource.

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

[<HostProtectionAttribute(SecurityAction.LinkDemand, ExternalThreading = true)>]
override BeginGetResponse : 
        callback:AsyncCallback *
        state:Object -> IAsyncResult

Parameters

callback
Type: System.AsyncCallback

The AsyncCallback delegate.

state
Type: System.Object

An object that contains state information for this request.

Return Value

Type: System.IAsyncResult

An IAsyncResult that references the asynchronous request.

Exception Condition
InvalidOperationException

The stream is already in use by a previous call to BeginGetResponse.

WebException

The FileWebRequest was aborted.

The asynchronous callback method that implements the AsyncCallback delegate uses the EndGetResponse method to return the actual FileWebResponse.

The following code example uses the BeginGetResponse method to asynchronously access a file system resource.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: