[Mono-list] XSP and Bin Directory

John Anderson sontek at gmail.com
Tue Nov 7 11:31:47 EST 2006

I was wondering if there is a reason XSP doesn't load libraries that
are in its Bin\ directory?

I created a simple web application with 1 page "HelloWorld.aspx"  and
it calls the library in its Bin\ Directory   HelloWorldApi.Say("Hi
World");  and I get "Can't find HelloWorldApi"  even though its in the
bin directory.   So then I created a global.asax file:

<%@ Application Language="C#" %>
<%@ Import Namespace="System" %>
<%@ Import Namespace="System.Reflection" %>
<%@ Import Namespace="System.Security.Policy" %>
<script runat="server" >
public void Session_Start(object sender, EventArgs e)
            AppDomain currentDomain = AppDomain.CurrentDomain;
        //Provide the current application domain evidence for the assembly.
        Evidence asEvidence = currentDomain.Evidence;
        //Load the assembly from the application directory using a simple name.

        //Make an array for the list of assemblies.
        Assembly[] assems = currentDomain.GetAssemblies();
        foreach (Assembly assem in assems)

and the Library does not show as being loaded:

7ab2d425, Version=, Culture=neutrale218620, Version=,
Culture=neutralSystem.Drawing, Version=, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3aSystem.Web.Services, Version=,
PublicKeyToken=b03f5f7f11d50a3aSystem.Data, Version=,
Culture=neutral, PublicKeyToken=b77a5c561934e089System.Configuration,
Version=, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3aMono.Security, Version=, Culture=neutral,
PublicKeyToken=0738eb9f132ed756System.Web, Version=, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3aSystem, Version=, Culture=neutral,
PublicKeyToken=b77a5c561934e089System.Xml, Version=, Culture=neutral,
PublicKeyToken=b77a5c561934e089Mono.WebServer2, Version=,
PublicKeyToken=0738eb9f132ed756mscorlib, Version=, Culture=neutral,

More information about the Mono-list mailing list