Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

HttpServerUtility.TransferRequest Method (String, Boolean, String, NameValueCollection, Boolean)

.NET Framework 4.6 and 4.5

Performs an asynchronous execution of the specified URL using the specified HTTP method, headers, and path, and optionally preserves form values and the user identity.

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

'Declaration
Public Sub TransferRequest ( _
	path As String, _
	preserveForm As Boolean, _
	method As String, _
	headers As NameValueCollection, _
	preserveUser As Boolean _
)

Parameters

path
Type: System.String

The path.

preserveForm
Type: System.Boolean

true to preserve the Form collection; false to clear the Form collection.

method
Type: System.String

The HTTP method to use in the new request.

headers
Type: System.Collections.Specialized.NameValueCollection

A NameValueCollection object that contains request headers for the new request.

preserveUser
Type: System.Boolean

true to preserve the user identity; otherwise, false. The other method overloads of this method call this overload with this parameter set to true.

ExceptionCondition
PlatformNotSupportedException

The request requires the integrated pipeline mode of IIS 7.0.

HttpException

The server is not available to handle the request.

ArgumentNullException

The path parameter is Nothing.

ArgumentException

The path parameter is invalid.

For more information, see the "Remarks" section in TransferRequest(String, Boolean, String, NameValueCollection).

.NET Framework

Supported in: 4.6, 4.5
Show:
© 2015 Microsoft