best app path method

K

kpg

I have seen two ways to get the application path on the server:

Server.MapPath(Request.ApplicationPath)

which returns: "c:\Inetpub\wwwroot\MyWeb"

and:

AppDomain.CurrentDomain.BaseDirectory()

which returns: "c:/Inetpub/wwwroot/MyWeb/"


Now, on my Win2000 Server either one will work fine, the
forward and back slashes seem to be interchangeable.

Is if there is an benefit (or drawback) to one or the
other? Which one is the 'recommended' way to get the
application path?

kpg
 

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

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top