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

Robert Jordan robertj at gmx.net
Tue May 2 06:05:19 EDT 2006


Xavier Mauclaire wrote:
> Thanks for the answer 
> 
> So is there any solutions to get the physical directory path of apache
> virtual directories ?

As I said: no.

You may store the mapping in the web.config's appSettings

<appSettings>
	<add key="TmpPhysicalPath" value="/foo/bar" />
</appSettings>

and obtain it from System.Configuration.ConfigurationSettings
	.AppSettings ["TmpPhysicalPath"]


Robert

> 
> 
> Regards
> 
>  
> 
> -----Message d'origine-----
> De : mono-list-bounces at lists.ximian.com
> [mailto:mono-list-bounces at lists.ximian.com] De la part de Robert Jordan
> Envoyé : mardi 2 mai 2006 11:28
> À : Mono-list at lists.ximian.com
> Objet : [Mono-list] Re: Httpserveurutility.Mappath doesn't return
> validresult
> 
>> 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.
> 
> Robert
> 
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
> 
> 
> __________ Information NOD32 1.1516 (20060501) __________
> 
> Ce message a ete verifie par NOD32 Antivirus System.
> http://www.nod32.com
> 
> 
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
> 



More information about the Mono-list mailing list