[Mono-list] Running MS compiled ASP.NET in Mono.

Olof Härwell olof.harwell@labs2.com
Tue, 30 Sep 2003 09:34:31 +0200


And regarding the ASP.NET error, in some cases (I'm not sure if this 
applies to your) when you have aspx/ascx-pages and codebehind in a 
different assembly than the one initially loaded by ASP.NET you need to 
add a:

<%@ Assembly Name="<assemblynamehere>" %>

in the top of your aspx file so that the runtime knows where to look for 
the codebehind class during the compile-phase of the aspx file.

/Olof

Mark Furniss wrote:

> Hi,
> 
> We have successfully installed Mono / XSP and mod_mono. The example 
> files supplied all run fine and also any simple (inline C#) ASPX files I 
> create are fine, however when I attempt to run any of our ASP.NET 
> applications (written in MS Visual Studio using compiled aspx.cs files) 
> they fail (see example error below this post).
> 
> Can anyone tell me if it is possible to just copy over a compiled MS 
> project that uses "code behind modules" and then run it, or do I need to 
> compile it using MCS.exe on Linux?
> 
> Basically I am looking to develop on Windows and deploy on Linux.
> 
> Assuming this is possible can anyone tell me if they are using 
> Mono/mod_mono (apache) in a production environment?
> 
> Many thanks
> Mark.
> 
> 
> Parser Error
> Description: Error parsing a resource required to service this request.
> Review your source file and modify it to fix this error.
> 
> Error message: Cannot find type HelloWorld._Default
> 
> File name: /home/markf/xsp-0.5/server/test/HelloWorld/Default.aspx
> Line: 1
> 
> Source Error:
> 
> <%@ Page language="c#" Codebehind="Default.aspx.cs"
> AutoEventWireup="false" Inherits="HelloWorld._Default" %>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
> <html>
>   <head>
> 
> 
> 
> 
> 
> 
> ________________________________________________________________________
> This email has been scanned for all viruses by the MessageLabs Email
> Security System. For more information on a proactive email security
> service working around the clock, around the globe, visit
> http://www.messagelabs.com
> ________________________________________________________________________
> _______________________________________________
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list