[Mono-devel-list] XSP - ASP.NET and /bin folder
olof.harwell at labs2.com
Wed Oct 8 12:03:09 EDT 2003
It is not possible in MS ASP.NET using IIS. Look at:
AppDomain.CurrentDomain.BaseDirectory (the AppDomain root, which is the
webroot in an ASP.NET app).
AppDomain.CurrentDomain.RelativeSearchPath (read-only) - A ;-seperated
list of relative subdirectories to the AppDomain root where the the
runtime looks for assemblies. By default this is set to /bin, so this is
the only place where the assemblies can reside.
However, by calling AppDomain.CurrentDomain.AppendPrivatePath(path) you
can add other directories to the
AppDomain.CurrentDomain.RelativeSearchPath. So if you have your
aspx-file in the webroot together with an assembly that you want to load
you need to add:
AppDomain.CurrentDomain.AppendPrivatePath("/") somewhere (e.g.
It is only possible to add relative paths so if the assembly resides
somewhere else they need to be registered in the GAC.
yoros at wanadoo.es wrote:
> On Wed, Oct 08, 2003 at 10:57:06AM +0200, Olof Härwell wrote:
>>You should also check the:
>>- AppDomain.CurrentDomain.SetShadowCopyPath(string paths)
>>Make sure your dlls are copied to the temporary folder
>>- AppDomain.CurrentDomain.AppendPrivatePath(string path)
>>Add the folder to the assembly lookup paths.
>>methods if you want to add DLLs that is not registered in the GAC and
>>not in the /bin directory. The still needs to reside under the webroot
>>due to security/appdomain reasons.
> Can you tell me if ASP.NET in MS IIS can access to an assembly in the
> same dir of the .aspx page that references that assembly? Can access to
> another assembly extensions (like .exe, for example)?
Direct: +46 46 540 01 10
Mobile: +46 70 941 20 10
Phone: +46 46 13 74 25
Fax: +46 46 13 74 26
Address: Winstrupsgatan 1, SE-222 22 Lund, Sweden
More information about the Mono-devel-list