System.Web.HttpServerUtility.MapPath Method

Returns the physical file path that corresponds to the specified virtual path on the Web server.

Syntax

public string MapPath (string path)

Parameters

path
The virtual path of the Web server.

Returns

The physical file path that corresponds to path.

Remarks

If path is null, then the HttpServerUtility.MapPath(string) method returns the full physical path of the directory that contains the current application.

Note:

The HttpServerUtility.MapPath(string) method potentially contains sensitive information about the hosting environment. The return value should not be displayed to users.

Requirements

Namespace: System.Web
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0