IIS 5, ASP (not ASP.NET)
=========================================
I have a virtual folder structure that look s basically like:

\RootVirtualFolder\
\RootVirtualFolder\VirtualSubFolderA

I have a script that exists at:
\RootVirtualFolder\ActualSubFolderA\LookForAFileInVirtualSubFolderA.asp

I am consfused by the results of these calls to server.mappath:
Server.MapPath( "\RootVirtualFolder\VirtualSubFolder" )
Server.MapPath( "..\VirtualSubFolder" )

The first call to mappath returns the expected full physical path of
VirtualSubFolder. However the second call returns the full physical path of
*RootVirtualFolder* plus a folder called, of course, VirtualSubFolder.

In my current project, this part of the application is deployable and the
RootVirtualPath is configurable ... meaning I cannot easily use the first
call to mappath as it requires the hardcoding of the RootVirtualFolder name.

Is there some other way to accomplish something like the second call?

TIA//

Re: Problem using relative paths with ASP Server.MapPath by Ratatooie

Ratatooie
Mon Oct 31 11:17:26 CST 2005


"../" is sometimes filtered out via URLscan for security reasons. (It allows
getting outside the virtual root.) So you may be able to change the behavior
if you choose.

You can change it by reconfiguring URLScan.ini.

"Chris Newby" <Chris.Newby@Rockcreekglobal.com> wrote in message
news:%23gsUBnj3FHA.128@tk2msftngp13.phx.gbl...
> IIS 5, ASP (not ASP.NET)
> =========================================
> I have a virtual folder structure that look s basically like:
>
> \RootVirtualFolder\
> \RootVirtualFolder\VirtualSubFolderA
>
> I have a script that exists at:
> \RootVirtualFolder\ActualSubFolderA\LookForAFileInVirtualSubFolderA.asp
>
> I am consfused by the results of these calls to server.mappath:
> Server.MapPath( "\RootVirtualFolder\VirtualSubFolder" )
> Server.MapPath( "..\VirtualSubFolder" )
>
> The first call to mappath returns the expected full physical path of
> VirtualSubFolder. However the second call returns the full physical path
> of *RootVirtualFolder* plus a folder called, of course, VirtualSubFolder.
>
> In my current project, this part of the application is deployable and the
> RootVirtualPath is configurable ... meaning I cannot easily use the first
> call to mappath as it requires the hardcoding of the RootVirtualFolder
> name.
>
> Is there some other way to accomplish something like the second call?
>
> TIA//
>
>