Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get root directory in ASP Classic application

I have several relative paths in my ASP Classic application. I'd like to get a reference to the root directory of my particular application (since the root of the server is something different) for the purpose of setting paths.

Is there a way to do this?

like image 982
Caveatrob Avatar asked Aug 11 '10 20:08

Caveatrob


2 Answers

Have you tried

<%= Server.MapPath("/") %>
like image 181
mathieu Avatar answered Sep 19 '22 03:09

mathieu


Use Request.ServerVariables("APPL_MD_PATH") or Request.ServerVariables("APPL_PHYSICAL_PATH").

like image 36
Li Chen Avatar answered Sep 20 '22 03:09

Li Chen