[Mono-list] Re: Httpserveurutility.Mappath doesn't return valid result

Robert Jordan robertj at gmx.net
Tue May 2 05:27:34 EDT 2006

> I'm developping asp.net application with VS2003 to be installed under mono
> on Linux
> On windows, i work with IIS and on LInux with Apache2
> On both web server a created an /tmp virtual directory (alias under apache )
> When a want do get the physical directory of "/tmp" i use the
> httpserverutilitu.mappath("/tmp")
> .net send me the c:\inetup\tmp
> Under linux i created the /srv/www/tmp directory aliased to "/tmp"
> The same function doesn't return the "/srv/ww/tmp" directory but the stored
> site directory (/home/site)
> which function can i use to get the good physical directory corresponding to
> the /tmp alias

You cannot obtain the physical path of an arbitrary Apache
alias using System.Web.

HttpServerUtility.MapPath () is able to resolve only
paths System.Web knows about. These are the paths inside the
application directory.


More information about the Mono-list mailing list