Local Dir

H

Hermit Dave

Hey,

Request.ApplicationPath will get you the virtual directory for the app.
Server.MapPath will get you the physical path

Response.Write(Request.ApplicationPath);
will return
/CodePlay
which is the actual virtual dir for my web app.
and
Response.Write(Server.MapPath(Request.ApplicationPath));
will return
c:\inetpub\wwwroot\CodePlay
which is also correct physical path on hdd

Chao,

Hermit Dave
 
H

Hermit Dave

how bout
Response.Write(Request.Url.Scheme + "://" + Request.Url.Host +
Request.ApplicationPath);

That should sort you out....

Hermit Dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top