Ho creato Mono 3.0.2 da sorgente (tarball) e ho creato XSP sia dall'ultimo tarball che dall'ultima su Github, ma non sono in grado per eseguire un'app asp.net relativamente semplice usando .net 4.5 perché vede 'targetFramework = "4.5"' in web.config come non valido. Costruire l'app ed eseguire una console .net 4.5 funziona perfettamente.Impossibile eseguire un'app di asp.net 4.5 su xsp su Mono 3
Questo è il web.config in questione:
<?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>
e questa è l'eccezione che xsp4 sta gettando:
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 ---
e alcune informazioni sulle versioni/configurazione:
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
[email protected]:~/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)
[email protected]:~/Downloads/xsp$
Se rimuovo gli elementi targetFramework da web.config, l'errore scompare, ma ho solo prendi un 404, quindi nessuno dei moduli http si sta connettendo.
Qualche idea? Mi è stato detto che xsp4 dovrebbe funzionare bene, ma da quello che vedo non sembra essere stato aggiornato per gestire il 4.5.
cosa intendi con "costruito XSP da entrambi gli ultimi tarball e gli ultimi su Github"? o si costruisce dal tarball o si costruisce da github – knocte
e AFAIK il tarball è molto vecchio quindi si dovrebbe costruire da github – knocte
Abbastanza semplice, ho costruito entrambi, provato entrambi, entrambi hanno dato lo stesso problema. –