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

Mark Furniss mark.furniss@mcg-graphics.com
Tue, 30 Sep 2003 09:53:35 +0100


Dear Gonzalo and fellow list gurus,

Thanks for your help. I have now managed to get a simple "hello world" 
application to run fine having copied the dll's to server/test/bin. 
However, when I try to run a more complicated application (multiple 
assemblies) I receive the following error (see below). Any ideas??

Thanks
Mark

Error in '/' Application
Error
Description: Error processing request.

Error Message:

Stack Trace:

System.Reflection.TargetInvocationException: Exception has been thrown 
by the target of an invocation. ---> System.NullReferenceException: A 
null value was found where an object instance was required
in <0x00075> 00 
MCGGraphics.Utilities.ErrorUtils.ErrorUtilities:SetErrorLogPath (string)
in <0x000a2> 00 MCGGraphics.Utilities.ErrorUtils.ErrorUtilities:.ctor ()
in <0x0003f> 00 
MCGGraphics.MCGIntranet.Classes.BaseClasses.MCGWebFormBaseClass:.ctor ()
in <0x0000a> 00 MCGGraphics.MCGIntranet._Default:.ctor ()
in <0x0000a> 00 ASP.Default_aspx:.ctor ()
in (unmanaged) /usr/local/lib/libmono.so.0 [0x400449e0]
in (unmanaged) /usr/local/lib/libmono.so.0(mono_runtime_invoke+0x27) 
[0x4008fcc3]
in (unmanaged) 
/usr/local/lib/libmono.so.0(mono_runtime_invoke_array+0x1d4) [0x40090a85]
in (unmanaged) /usr/local/lib/libmono.so.0 [0x40096c2e]
in <0x0009c> 00 System.Reflection.MonoCMethod:Invoke 
(object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo)
--- End of inner exception stack trace ---

in <0x000e4> 00 System.Reflection.MonoCMethod:Invoke 
(object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo)
in <0x00022> 00 System.Reflection.MonoCMethod:Invoke 
(System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo)
in <0x00042> 00 System.Reflection.ConstructorInfo:Invoke (object[])
in <0x00157> 00 System.Activator:CreateInstance (System.Type,bool)
in <0x00012> 00 System.Activator:CreateInstance (System.Type)
in <0x00095> 00 System.Web.UI.TemplateControlParser:GetCompiledInstance 
(string,string,System.Web.HttpContext)
in <0x0004c> 00 System.Web.UI.PageParser:GetCompiledPageInstance 
(string,string,System.Web.HttpContext)
in <0x00013> 00 System.Web.UI.PageHandlerFactory:GetHandler 
(System.Web.HttpContext,string,string,string)
in <0x001a9> 00 System.Web.HttpApplication:CreateHttpHandler 
(System.Web.HttpContext,string,string,string)
in <0x0011f> 00 .CreateHandlerState:Execute ()
in <0x0006f> 00 .StateMachine:ExecuteState 
(System.Web.HttpApplication/IStateHandler,bool&)



Gonzalo Paniagua Javier wrote:

> El lun, 29-09-2003 a las 18:53, Mark Furniss escribió:
> 
>>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>
> 
> 
> Visual Studio should compile Default.aspx.cs into a dll and that dll
> should be in 'bin' directory. If you copy those dlls in bin to linux, it
> should work.
> 
> -Gonzalo
> 
> _______________________________________________
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
> 
> ________________________________________________________________________
> 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
> ________________________________________________________________________
> 


________________________________________________________________________
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
________________________________________________________________________