[Mono-list] mod_mono DLL reloading

Gonzalo Paniagua Javier gonzalo at ximian.com
Thu Nov 17 17:30:51 EST 2005


On Thu, 2005-11-17 at 12:00 +0000, Matthew Law wrote:
> Hi,
> 
> I have just started to use mono.  I have installed from the latest mono
> installer and then I installed mod_mono and xsp with apache 2 on an Ubuntu
> linux box.
> 
> So far so good, and well-done to the developers for what they have
> achieved so far :-)
> 
> However, during testing some simple ASP.Net pages I noticed that if I
> write my code in a separate file, then compile to a DLL and copy that DLL
> to the bin directory I get  a 'missing type' error when I try to run the
> page.  If I stop and start apache it works as expected and sees the
> updated code in the DLL.  The 'src' page directive works as expected, i.e.
> using test.aspx and test.aspx.cs the changes are immediate after the first
> page hit compiles the page.
> 
> Is this a known bug or is it intentional?  It's not a big problem for me
> as I can use the 'src' way of doing things, it's just that I am used to
> working this way when writing ASP.NET on windows with Visual Studio.

When the asp.net runtime detects such a change, it tries to unload the
asp.net application (its AppDomain) and then create a new one. The
problem is that the unload might fail and that if you copy your dll over
one that existed previously the mono runtime will not realize that and
will keep using the old assembly. Implementing support for
ShadowCopyFiles would help with this.

-Gonzalo




More information about the Mono-list mailing list