best app path method

  • Thread starter Thread starter kpg
  • Start date Start date
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
 
Back
Top