[Mono-aspnet-list] It's Bug? - MapPath method cannot return apache2.2 aliases

USAGI@WRP usagi at WonderRabbitProject.net
Sat May 23 10:42:46 EDT 2009

the method is "string System.Web.HttpContext.Current.Server.MapPath(string

I noticed that the method returned with a false pass on Apache(2.2) +
mod_mono(2.4) with alias configuration.

 Apache xxxx.conf

  DocumentRoot /var/www
  Alias /hoge /var/hoge

 ASP.NET code

  var physicalPath = HttpContext.Current.Server.MapPath("/hoge")

The result in this situation becomes the ”/var/www/hoge”. it's not Physical
Path. it's Virtual Path on the Apache.

When I tested it in IIS7 with Windows Vista, the method returned truth
Physical Path. the problem is bug of mono?

# This trouble is avoidable easy.
# In substitution for an alias function of Apache, it should make a symbolic
link. for now.

View this message in context: http://www.nabble.com/It%27s-Bug----MapPath-method-cannot-return-apache2.2-aliases-tp23685146p23685146.html
Sent from the Mono - ASP.NET mailing list archive at Nabble.com.

More information about the Mono-aspnet-list mailing list