By using "/myapp" you have confused the issue. "myapp" appears nowhere in
the example you originally provided.
I was under the impression that ApplicationPath was equivalent to physical
path. It seems I was mistaken. Given the virtual paths you descibed
originally what do you wish to retrieve?
http://server/virtualpath ?
/virtualpath ?
I just looked it up: "Gets the ASP.NET application's virtual application
root path on the server."
So it appears you wish to obtain /virtualpath, correct?
There is nothing builtin for this. You will need to parse one of the
following servervariables:
APPL_MD_PATH
PATH_INFO
SCRIPT_NAME
URL
Bob Barrows
Vadym Stetsyak wrote:
Server.MapPath - it maps relative or virtual path to the physical
path. I need something else, I want to obtain virtual root path, like
/myapp
In asp.net Request.ApplicationPath - gives the application's virtual
application root path on the server. This is the kind of
functionality I need in the asp
"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcom> wrote in message
news:uz**************@TK2MSFTNGP10.phx.gbl... Vadym Stetsyak wrote: Hi, All!
For example if I have
http://server/myvirtualpath/someotherpath/page.asp
and virtual path on the IIS is http://server/myvirtualpath
How can I retrieve above mentioned asp application path. I need the
same functionality that has ASP.NET (Request.ApplicationPath)
Use Server.MapPath
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"