[Mono-dev] Fail to run aspx web application on mod_mono-2.10 ( .Net 4 framework )

Anas Muzakir anas.muzakir at gmail.com
Wed Jul 18 08:02:50 UTC 2012


Hi,

I update the configuration to :

MonoPath default "/opt/mono/lib/mono/4.5"

but it throw new error :

System.NullReferenceException: Object reference not set to an instance of
an object

Server stack trace:
  at Mono.WebServer.BaseApplicationHost.EndOfRequest
(Mono.WebServer.MonoWorkerRequest mwr) [0x00029] in
/tmp/xsp-2.10.2/src/Mono.WebServer/BaseApplicationHost.cs:141
  at Mono.WebServer.ModMonoApplicationHost.ProcessRequest (Int32 reqId,
System.String verb, System.String queryString, System.String path,
System.String protocol, System.String localAddress, Int32 serverPort,
System.String remoteAddress, Int32 remotePort, System.String remoteName,
System.String[] headers, System.String[] headerValues, System.Object
worker) [0x00173] in
/tmp/xsp-2.10.2/src/Mono.WebServer.Apache/ModMonoApplicationHost.cs:109
  at (wrapper remoting-invoke-with-check)
Mono.WebServer.ModMonoApplicationHost:ProcessRequest
(int,string,string,string,string,string,int,string,int,string,string[],string[],object)
  at (wrapper xdomain-dispatch)
Mono.WebServer.ModMonoApplicationHost:ProcessRequest
(object,byte[]&,byte[]&,int,string,string,string,string,string,int,string,int,string,string[],string[])

Exception rethrown at [0]:

  at (wrapper xdomain-invoke)
Mono.WebServer.ModMonoApplicationHost:ProcessRequest
(int,string,string,string,string,string,int,string,int,string,string[],string[],object)
  at (wrapper remoting-invoke-with-check)
Mono.WebServer.ModMonoApplicationHost:ProcessRequest
(int,string,string,string,string,string,int,string,int,string,string[],string[],object)
  at Mono.WebServer.ModMonoWorker.InnerRun (System.Object state) [0x00199]
in /tmp/xsp-2.10.2/src/Mono.WebServer.Apache/ModMonoWorker.cs:239
  at Mono.WebServer.ModMonoWorker.Run (System.Object state) [0x00002] in
/tmp/xsp-2.10.2/src/Mono.WebServer.Apache/ModMonoWorker.cs:92

FYI, I don't get issue if i run mcs manually, with this command

$  su -s /bin/sh apache -c  "mcs /target:library
/lib:"/home/anas/temp/WebApp4/Bin" /debug+ /optimize- /warn:4
/out:"/tmp/apache-temp-aspnet-0/f6c3a887/App_global.asax_6d79ca9b.

dll" /r:"/opt/mono/lib/mono/4.0/Microsoft.CSharp.dll"
/r:"/opt/mono/lib/mono/4.0/System.dll"
/r:"/opt/mono/lib/mono/4.0/System.Configuration.dll"
/r:"/opt/mono/lib/mono/4.0/System.Web.dll" /r:"/opt/mono/lib
/mono/4.0/System.Data.dll"
/r:"/opt/mono/lib/mono/4.0/System.Web.Services.dll"
/r:"/opt/mono/lib/mono/4.0/System.Xml.dll"
/r:"/opt/mono/lib/mono/4.0/System.Drawing.dll"
/r:"/opt/mono/lib/mono/4.0/System.Ent
erpriseServices.dll" /r:"/opt/mono/lib/mono/4.0/System.IdentityModel.dll"
/r:"/opt/mono/lib/mono/4.0/System.Runtime.Serialization.dll"
/r:"/opt/mono/lib/mono/4.0/System.Xaml.dll" /r:"/opt/mono/lib/mono/4.0/
System.ServiceModel.dll"
/r:"/opt/mono/lib/mono/4.0/System.ServiceModel.Web.dll"
/r:"/opt/mono/lib/mono/4.0/System.Core.dll"
/r:"/opt/mono/lib/mono/4.0/System.Web.Extensions.dll"
/r:"/opt/mono/lib/mono/4.0/
System.Data.DataSetExtensions.dll"
/r:"/opt/mono/lib/mono/4.0/System.Xml.Linq.dll"
/r:"/opt/mono/lib/mono/4.0/System.ComponentModel.DataAnnotations.dll"
/r:"/opt/mono/lib/mono/4.0/System.Web.DynamicData.dll
" /r:"/opt/mono/lib/mono/4.0/System.Data.Linq.dll"
/r:"/opt/mono/lib/mono/4.0/System.Web.ApplicationServices.dll"
/r:"/tmp/apache-temp-aspnet-0/59d988b0/assembly/shadow/03dd29fd/cc4cc42e_cf91edd3_00000001/W
ebApp4.dll"  /nowarn:0169 /d:DEBUG /noconfig /sdk:4 --
"/tmp/apache-temp-aspnet-0/f6c3a887/App_global.asax_6d79ca9b_0.cs""



Regards,
Anas

On Tue, Jul 17, 2012 at 6:53 PM, Marek Safar <marek.safar at gmail.com> wrote:

> Hi,
>
>
>> i tried to debug more deeper, got an error :
>>
>> "`0169' is not a valid warning number"
>>
>> Could not load type 'System.Runtime.CompilerServices.ExtensionAttribute'
>> from assembly 'System.Core'.
>>  at Mono.CSharp.CompilerSettings.SetIgnoreWarning (Int32 code) [0x00000]
>> in <filename unknown>:0
>>   at Mono.CSharp.CommandLineParser.ParseOption (System.String option,
>> System.String[]& args, Mono.CSharp.CompilerSettings settings) [0x00000] in
>> <filename unknown>:0
>>
>> here's string content from BuilArgs both for xsp4 and mod-mono
>>
>
> What is missing is how mod-mono calls C# compiler, from your log it looks
> like it forces 4.0 runtime for it where you need 4.5 runtime. This could be
> just wrong path settings, try to run mod-mono with path set
> to /opt/mono/lib/mono/4.5/
>
> Marek
>
>
>>
>> --- mod-mono
>>
>> /target:library /lib:"/home/anas/temp/WebApp4/Bin" /debug+ /optimize-
>> /warn:4
>> /out:"/tmp/apache-temp-aspnet-0/f6c3a887/App_global.asax_1eff02c.dll"
>> /r:"/opt/mono/lib/mono/4.0/Microsoft.CSharp.dll"
>> /r:"/opt/mono/lib/mono/4.0/System.dll"
>> /r:"/opt/mono/lib/mono/4.0/System.Configuration.dll"
>> /r:"/opt/mono/lib/mono/4.0/System.Web.dll"
>> /r:"/opt/mono/lib/mono/4.0/System.Data.dll"
>> /r:"/opt/mono/lib/mono/4.0/System.Web.Services.dll"
>> /r:"/opt/mono/lib/mono/4.0/System.Xml.dll"
>> /r:"/opt/mono/lib/mono/4.0/System.Drawing.dll"
>> /r:"/opt/mono/lib/mono/4.0/System.EnterpriseServices.dll"
>> /r:"/opt/mono/lib/mono/4.0/System.IdentityModel.dll"
>> /r:"/opt/mono/lib/mono/4.0/System.Runtime.Serialization.dll"
>> /r:"/opt/mono/lib/mono/4.0/System.Xaml.dll"
>> /r:"/opt/mono/lib/mono/4.0/System.ServiceModel.dll"
>> /r:"/opt/mono/lib/mono/4.0/System.ServiceModel.Web.dll"
>> /r:"/opt/mono/lib/mono/4.0/System.Core.dll"
>> /r:"/opt/mono/lib/mono/4.0/System.Web.Extensions.dll"
>> /r:"/opt/mono/lib/mono/4.0/System.Data.DataSetExtensions.dll"
>> /r:"/opt/mono/lib/mono/4.0/System.Xml.Linq.dll"
>> /r:"/opt/mono/lib/mono/4.0/System.ComponentModel.DataAnnotations.dll"
>> /r:"/opt/mono/lib/mono/4.0/System.Web.DynamicData.dll"
>> /r:"/opt/mono/lib/mono/4.0/System.Data.Linq.dll"
>> /r:"/opt/mono/lib/mono/4.0/System.Web.ApplicationServices.dll"
>> /r:"/tmp/apache-temp-aspnet-0/59d988b0/assembly/shadow/03dd29fd/cc4cc42e_cf91edd3_00000001/WebApp4.dll"
>> /nowarn:0169 /d:DEBUG /noconfig /sdk:4 --
>> "/tmp/apache-temp-aspnet-0/f6c3a887/App_global.asax_1eff02c_0.cs"
>>
>> --- xsp4
>>
>> /target:library /lib:"/home/anas/temp/WebApp4/bin" /debug+ /optimize-
>> /warn:4 /out:"/tmp/anas-temp-aspnet-0/fe1e55c0/App_global.asax_39600c7.dll"
>> /r:"/opt/mono/lib/mono/gac/Microsoft.CSharp/4.0.0.0__b03f5f7f11d50a3a/Microsoft.CSharp.dll"
>> /r:"/opt/mono/lib/mono/4.0/System.dll"
>> /r:"/opt/mono/lib/mono/4.0/System.Configuration.dll"
>> /r:"/opt/mono/lib/mono/4.0/System.Web.dll"
>> /r:"/opt/mono/lib/mono/gac/System.Data/4.0.0.0__b77a5c561934e089/System.Data.dll"
>> /r:"/opt/mono/lib/mono/gac/System.Web.Services/4.0.0.0__b03f5f7f11d50a3a/System.Web.Services.dll"
>> /r:"/opt/mono/lib/mono/4.0/System.Xml.dll"
>> /r:"/opt/mono/lib/mono/gac/System.Drawing/4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll"
>> /r:"/opt/mono/lib/mono/gac/System.EnterpriseServices/4.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll"
>> /r:"/opt/mono/lib/mono/gac/System.IdentityModel/4.0.0.0__b77a5c561934e089/System.IdentityModel.dll"
>> /r:"/opt/mono/lib/mono/gac/System.Runtime.Serialization/4.0.0.0__b77a5c561934e089/System.Runtime.Serialization.dll"
>> /r:"/opt/mono/lib/mono/gac/System.Xaml/4.0.0.0__b77a5c561934e089/System.Xaml.dll"
>> /r:"/opt/mono/lib/mono/gac/System.ServiceModel/4.0.0.0__b77a5c561934e089/System.ServiceModel.dll"
>> /r:"/opt/mono/lib/mono/gac/System.ServiceModel.Web/4.0.0.0__31bf3856ad364e35/System.ServiceModel.Web.dll"
>> /r:"/opt/mono/lib/mono/4.0/System.Core.dll"
>> /r:"/opt/mono/lib/mono/gac/System.Web.Extensions/4.0.0.0__31bf3856ad364e35/System.Web.Extensions.dll"
>> /r:"/opt/mono/lib/mono/gac/System.Data.DataSetExtensions/4.0.0.0__b77a5c561934e089/System.Data.DataSetExtensions.dll"
>> /r:"/opt/mono/lib/mono/gac/System.Xml.Linq/4.0.0.0__b77a5c561934e089/System.Xml.Linq.dll"
>> /r:"/opt/mono/lib/mono/gac/System.ComponentModel.DataAnnotations/4.0.0.0__31bf3856ad364e35/System.ComponentModel.DataAnnotations.dll"
>> /r:"/opt/mono/lib/mono/gac/System.Web.DynamicData/4.0.0.0__31bf3856ad364e35/System.Web.DynamicData.dll"
>> /r:"/opt/mono/lib/mono/gac/System.Data.Linq/4.0.0.0__b77a5c561934e089/System.Data.Linq.dll"
>> /r:"/opt/mono/lib/mono/gac/System.Web.ApplicationServices/4.0.0.0__31bf3856ad364e35/System.Web.ApplicationServices.dll"
>> /r:"/home/anas/temp/WebApp4/bin/WebApp4.dll"  /nowarn:0169 /d:DEBUG
>> /noconfig /sdk:4 --
>> "/tmp/anas-temp-aspnet-0/fe1e55c0/App_global.asax_39600c7_0.cs"
>> output = /tmp/anas-temp-aspnet-0/fe1e55c0/App_global.asax_39600c7.dll
>>
>> any clue why such an error happen only on mod_mono ?
>>
>>
>> On Fri, Jul 13, 2012 at 4:52 PM, Anas Muzakir <anas.muzakir at gmail.com>wrote:
>>
>>> Hi Rob,
>>>
>>> Thanks for reply,
>>>
>>> I've tested options.OutputAssembly variable and it points to valid path.
>>> and I also execute mcs manually using string parameter that comes from
>>> BuilArgs function, and i can confirm this manual execution able to generate
>>> the dll file.
>>>
>>> i run it with this command : su -s /bin/sh apache -c "mcs .... "
>>>
>>> FYI, it fail while trying to build  global.asa
>>>
>>>
>>> Regards,
>>> Anas
>>>
>>> On Tue, Jul 10, 2012 at 7:32 PM, Rob Wilkens <robwilkens at gmail.com>wrote:
>>>
>>>>
>>>> If there was a compile time error, you should be seeing output between
>>>> the '' (or '') ..
>>>>
>>>> But it's empty
>>>>
>>>> So what it's telling you is the compile succeeded but the file does not
>>>> exist, or does not exist where it was expected to be found.
>>>>
>>>> Odd sort of error.  Sounds like a configuration issue.
>>>>
>>>> If you want to know what file it's looking for, around line 274 of
>>>> CSharpCodeCompiler.cs, do something before the foreach loop which does
>>>> something like:
>>>> sb.Append("Looking for this file: "+options.OutputAssembly);
>>>>
>>>> IF you don't want to play with the mono source, and instead are looking
>>>> for information on how to configure mono, i hate to suggest this, but
>>>> perhaps mono-devel list is not the place to ask.
>>>>
>>>> -Rob
>>>>
>>>>
>>>> On 07/09/2012 11:42 PM, Anas Muzakir wrote:
>>>>
>>>> Hi All,
>>>>
>>>> I try to porting our web application ( aspx file ) to mono using
>>>> mono-2.11
>>>> under centOS 6.2
>>>>
>>>> i got issue while running our application under apache webserver
>>>> that mcs wont create dll file on /tmp/apache-temp-aspnet-0/xxxx....
>>>> it able to generate cs file but not the assembly file
>>>>
>>>> i have tried to debug by run the mcs manually using argument that
>>>> generated by mcs/class/System/Microsoft.CSharp/CSharpCodeCompile.cs
>>>> and it works , assembly dll file is successfully generated.
>>>>
>>>> here's the error message at client browser
>>>>
>>>> <!--[System.Exception]: Compiler failed to produce the assembly. Output: ''  at Mono.CSharp.CSharpCodeCompiler.CompileFromFileBatch (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames) [0x00000] in <filename unknown>:0   at Mono.CSharp.CSharpCodeCompiler.CompileAssemblyFromFileBatch (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames) [0x00000] in <filename unknown>:0   at System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromFile (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames) [0x00000] in <filename unknown>:0   at System.Web.Compilation.AssemblyBuilder.BuildAssembly (System.Web.VirtualPath virtualPath, System.CodeDom.Compiler.CompilerParameters options) [0x00000] in <filename unknown>:0   at System.Web.Compilation.AssemblyBuilder.BuildAssembly (System.Web.VirtualPath virtualPath) [0x00000] in <filename unknown>:0   at System.Web.Compilation.BuildManager.GenerateAssembly (System.Web.Compilation.AssemblyBuilder abuilder, System.Web.Compilation.BuildProviderGroup group, System.Web.VirtualPath vp, Boolean debug) [0x00000] in <filename unknown>:0   at System.Web.Compilation.BuildManager.BuildInner (System.Web.VirtualPath vp, Boolean debug) [0x00000] in <filename unknown>:0   at System.Web.Compilation.BuildManager.Build (System.Web.VirtualPath vp) [0x00000] in <filename unknown>:0   at System.Web.Compilation.BuildManager.GetCompiledType (System.Web.VirtualPath virtualPath) [0x00000] in <filename unknown>:0   at System.Web.Compilation.BuildManager.GetCompiledType (System.String virtualPath) [0x00000] in <filename unknown>:0   at System.Web.HttpApplicationFactory.InitType (System.Web.HttpContext context) [0x00000] in <filename unknown>:0 -->
>>>>
>>>> and xsp4 will not return this error
>>>>
>>>> testing environment
>>>> - centos 6.2
>>>> - mono.2-11 ( i compile it with --prefix=/opt/mono
>>>> - mod_mono-2.10
>>>> - xsp-2.10.2
>>>>
>>>> apache configuration :
>>>>
>>>> MonoAutoApplication enabled
>>>> MonoServerPath default "/opt/mono/bin/mod-mono-server4"
>>>> MonoPath default "/opt/mono/bin/mono/4.0"
>>>> MonoApplicationConfigDir default "/opt/mono/lib/mono/4.0"
>>>>
>>>>
>>>> Did i miss something on the configuration ?
>>>> or anyone can guide me how to debug this issue  ?
>>>>
>>>> Regards,
>>>> Anas
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Mono-devel-list mailing listMono-devel-list at lists.ximian.comhttp://lists.ximian.com/mailman/listinfo/mono-devel-list
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Mono-devel-list mailing list
>>>> Mono-devel-list at lists.ximian.com
>>>> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>>>>
>>>>
>>>
>>
>> _______________________________________________
>> Mono-devel-list mailing list
>> Mono-devel-list at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20120718/e8f2a691/attachment-0001.html>


More information about the Mono-devel-list mailing list