I've build Mono 3.0.2 from source (tarball), and built XSP from both the latest tarball and the latest on Github, but I'm unable to run a relatively simple asp.net app using .net 4.5 because it sees 'targetFramework="4.5"' in the web.config as invalid. Building the app, and running a console .net 4.5 app works just fine.
This is the web.config in question:
<?xml version="1.0"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<appSettings>
<add key="owin:HandleAllRequests" value="true" />
<add key="owin:SetCurrentDirectory" value="true" />
</appSettings>
<system.web>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" />
</system.web>
</configuration>
And this is the exception that xsp4 is throwing:
An exception has occurred while generating HttpException page:
System.NullReferenceException: Object reference not set to an instance of an object
at System.Web.Util.HttpEncoder.GetCustomEncoderFromConfig () [0x00000] in <filename unknown>:0
at System.Lazy`1[System.Web.Util.HttpEncoder].InitValue () [0x00000] in <filename unknown>:0
The actual exception which was being reported was:
System.Web.HttpException: Initial exception ---> System.Configuration.ConfigurationErrorsException: Error deserializing configuration section httpRuntime: Unrecognized attribute 'targetFramework'. (/home/srobbins/Projects/nancykatana/NancyKatana/Web.config line
1)
at System.Configuration.ConfigurationSection.DeserializeSection (System.Xml.XmlReader reader) [0x00000] in <filename unknown>:0
at System.Configuration.Configuration.GetSectionInstance (System.Configuration.SectionInfo config, Boolean createDefaultInstance) [0x00000] in <filename unknown>:0
at System.Configuration.ConfigurationSectionCollection.get_Item (System.String name) [0x00000] in <filename unknown>:0
at System.Configuration.Configuration.GetSection (System.String path) [0x00000] in <filename unknown>:0
at System.Web.Configuration.WebConfigurationManager.GetSection (System.String sectionName, System.String path, System.Web.HttpContext context) [0x00000] in <filename unknown>:0
at System.Web.Configuration.WebConfigurationManager.GetSection (System.String sectionName) [0x00000] in <filename unknown>:0
at System.Web.HttpRuntime..cctor () [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
And some information about the versions/configuration:
xsp-2.11
Build Environment
Install prefix: /usr/local
Datadir: /usr/local/share
Libdir: /usr/local/lib
Build documentation: yes
Mono 2.0 compiler: /usr/local/bin/gmcs
Mono 4.0 compiler: /usr/local/bin/dmcs
Target frameworks: .NET 2.0, .NET 4.0
Build SQLite samples: yes
srobbins@ubuntu-vm:~/Downloads/xsp$ /usr/local/bin/mono --version
Mono JIT compiler version 3.0.2 (tarball Tue Jan 8 08:23:06 GMT 2013)
Copyright (C) 2002-2012 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: x86
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: Included Boehm (with typed GC and Parallel Mark)
srobbins@ubuntu-vm:~/Downloads/xsp$
If I remove the targetFramework elements from the web.config then the error goes away, but I just get a 404, so none of the http modules are getting hooked up.
Any ideas? I've been told that xsp4 should work just fine, but from what I can see it does't appear to have been updated to handle 4.5 at all.