[Mono-list] Run ASP.Net 4.0 profile

Abe Gillespie abe.gillespie at gmail.com
Fri Oct 8 13:15:12 EDT 2010


This is the error I get if I copy the 4.0 System.Web assembly to the
local bin dir:

System.TypeInitializationException: An exception was thrown by the
type initializer for System.Web.Configuration.WebConfigurationManager

Server stack trace:
  at System.Web.Hosting.ApplicationHost.SetHostingEnvironment () [0x00000] in <f
ilename unknown>:0
  at System.AppDomain.DoCallBack (System.CrossAppDomainDelegate callBackDelegate
) [0x00000] in <filename unknown>:0
  at (wrapper remoting-invoke-with-check) System.AppDomain:DoCallBack (System.Cr
ossAppDomainDelegate)
  at (wrapper xdomain-dispatch) System.AppDomain:DoCallBack (object,byte[]&,byte
[]&)

Exception rethrown at [0]:
 ---> System.MissingMethodException: Method not found: 'System.Type.op_Inequalit
y'.
  --- End of inner exception stack trace ---  at (wrapper
xdomain-invoke) System.AppDomain:DoCallBack
(System.CrossAppDomainDelegate)  at (wrapper
remoting-invoke-with-check) System.AppDomain:DoCallBack (System.Cr
ossAppDomainDelegate)
  at System.Web.Hosting.ApplicationHost.CreateApplicationHost
(System.Type hostType, System.String virtualDir, System.String
physicalDir) [0x00000] in <filename unknown>:0
  at Mono.WebServer.VPathToHost.CreateHost
(Mono.WebServer.ApplicationServer server, Mono.WebServer.WebSource
webSource) [0x00000] in <filename unknown>:0
  at Mono.WebServer.Apache.Server.RealMain (System.String[] args,
Boolean root, IApplicationHost ext_apphost, Boolean quiet) [0x00000]
in <filename unknown>:0
  at Mono.WebServer.Apache.Server.Main (System.String[] args)
[0x00000] in <filename unknown>:0


On Fri, Oct 8, 2010 at 11:18 AM, Abe Gillespie <abe.gillespie at gmail.com> wrote:
> How do you instruct Mono to run the 4.0 profile for an ASP.Net MVC2
> site?  I'm using the
>
> MonoServerPath "/usr/local/mono/2.8/bin/mod-mono-server4"
>
> directive but this doesn't seem to be enough.  During startup I get:
> System.TypeLoadException: Could not load type
> 'System.Web.Routing.RouteCollection' from assembly 'System.Web,
> Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
>
> I can't use this in the Web.config:
> <compilation debug="true" targetFramework="4.0">
> because the targetFramework attribute is not recognized.
>
> I've also tried adding:
> <add assembly="System.Web, Version=4.0.0.0, Culture=neutral,
> PublicKeyToken=b03f5f7f11d50a3a" />
> to the <compilation><assemblies> collection of the Web.config but this
> doesn't seem to help either.
>
> Now if I manually copy the gac's 4.0 System.Web assembly into the
> site's bin then I can get a little further than the above stated error
> but other badness happens.
>
> Any ideas?
>
> Thanks.
> -Abe
>


More information about the Mono-list mailing list