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

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,240
Members
46,830
Latest member
HeleneMull

Latest Threads

Top