HttpRequestWrapper.MapPath 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.
Maps the virtual path in the requested URL to a physical path on the server.
Overloads
MapPath(String) |
Maps the specified virtual path to a physical path on the server. |
MapPath(String, String, Boolean) |
Maps the specified virtual path to a physical path on the server. |
MapPath(String)
Maps the specified virtual path to a physical path on the server.
public:
override System::String ^ MapPath(System::String ^ virtualPath);
public override string MapPath (string virtualPath);
override this.MapPath : string -> string
Public Overrides Function MapPath (virtualPath As String) As String
Parameters
- virtualPath
- String
The virtual path (absolute or relative) to map to a physical path.
Returns
The physical path on the server that is specified by virtualPath
.
Applies to
MapPath(String, String, Boolean)
Maps the specified virtual path to a physical path on the server.
public:
override System::String ^ MapPath(System::String ^ virtualPath, System::String ^ baseVirtualDir, bool allowCrossAppMapping);
public override string MapPath (string virtualPath, string baseVirtualDir, bool allowCrossAppMapping);
override this.MapPath : string * string * bool -> string
Public Overrides Function MapPath (virtualPath As String, baseVirtualDir As String, allowCrossAppMapping As Boolean) As String
Parameters
- virtualPath
- String
The virtual path (absolute or relative) to map to a physical path.
- baseVirtualDir
- String
The virtual base directory path that is used for relative resolution.
- allowCrossAppMapping
- Boolean
true
to indicate that virtualPath
can belong to another application; otherwise, false
.
Returns
The physical path on the server.
Exceptions
allowCrossAppMapping
is false
and virtualPath
belongs to another application.
-or-
No HttpContext object is defined for the request.
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기