HttpRequest.SaveAs(String, Boolean) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Saves an HTTP request to disk.
public:
void SaveAs(System::String ^ filename, bool includeHeaders);
public void SaveAs (string filename, bool includeHeaders);
member this.SaveAs : string * bool -> unit
Public Sub SaveAs (filename As String, includeHeaders As Boolean)
Parameters
- filename
- String
The physical drive path.
- includeHeaders
- Boolean
A Boolean value specifying whether an HTTP header should be saved to disk.
Exceptions
The RequireRootedSaveAsPath property of the HttpRuntimeSection is set to true
but filename
is not an absolute path.
Examples
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.
Request.SaveAs("c:\\temp\\HttpRequest.txt", true);
Request.SaveAs("c:\\temp\\HttpRequest.txt", True)
Remarks
Saving the request context to disk can be useful in debugging.
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기