HttpRequest.SaveAs Method (String, Boolean)

 

Saves an HTTP request to disk.

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

member SaveAs : 
        filename:string *
        includeHeaders:bool -> unit

Parameters

filename
Type: System.String

The physical drive path.

includeHeaders
Type: System.Boolean

A Boolean value specifying whether an HTTP header should be saved to disk.

Exception Condition
HttpException

The RequireRootedSaveAsPath property of the HttpRuntimeSection is set to true but filename is not an absolute path.

Saving the request context to disk can be useful in debugging.

The following code example calls the SaveAs method when a page is loaded. The call specifies that the request be saved as a text file in a directory where the ASP.NET process identity has been granted write permissions, and that any header information included in the request is included in the file.

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

.NET Framework
Available since 1.1
Return to top
Show: