The MapPath method returns the ASP 0173 error, "Invalid Path Character", if the Path parameter contains any of the following characters:
Asterisk (*)
Question mark (?)
Angle brackets (< or >)
Comma (,)
Colon or semi-colon (: or ;)
Single-quote or double-quote (' or ")
Right square bracket (])
Double slashes (// or \\)
This method does not check whether the path it returns is valid or exists on the server. MapPath is not available to the Session_OnEnd and the Application_OnEnd events.
Because the MapPath method maps a path regardless of whether the specified directories currently exist, you can use the MapPath method to map a path to a physical directory structure, and then pass that path to a component that creates the specified directory or file on the server.
Caution: |
|---|
For security reasons, the
AspEnableParentPaths property has a default value set to FALSE. Scripts will not have access to the physical directory structure unless AspEnableParentPaths is set to TRUE.
|