Stworzyłem Mono 3.0.2 ze źródła (archiwum) i zbudowałem XSP zarówno z najnowszego archiwum targów, jak i najnowszego Githuba, ale nie jestem w stanie uruchomić względnie prostą aplikację asp.net z wykorzystaniem .net 4.5, ponieważ widzi "targetFramework =" 4,5 "w pliku web.config jako niepoprawny. Budowanie aplikacji i uruchamianie konsoli .NET 4.5 działa dobrze.Nie można uruchomić aplikacji asp.net 4.5 na xsp na Mono 3
To web.config w pytaniu:
<?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>
I to jest wyjątek, który xsp4 rzuca:
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 ---
A niektóre informacje o wersji/konfiguracji:
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$
Jeśli usunę elementy targetFramework z pliku web.config, błąd zniknie, ale ja po prostu otrzymasz 404, więc żaden z modułów http nie zostanie podłączony.
Wszelkie pomysły? Powiedziano mi, że xsp4 powinien działać dobrze, ale z tego, co widzę, wydaje się, że nie został zaktualizowany do obsługi 4.5.
co masz na myśli mówiąc "zbudowany XSP zarówno z najnowszego archiwum targów, jak i najnowszego Githuba"? albo budujesz z tarballa, albo budujesz z github – knocte
, a AFAIK tarball jest bardzo stary, więc powinieneś zbudować z github – knocte
Całkiem proste, zbudowałem oba, próbowałem obu, oba dały ten sam problem. –