無法使用 XSP4 運行 MonoDevelop 4.2

無法使用 XSP4 運行 MonoDevelop 4.2

先生們,

我是 Linux 新手,當我開始偵錯 MonoDevelop ASP.NET 應用程式的範例時,我嘗試在 Ubuntu 下啟動 .NET,但出現以下錯誤:

Could not launch web server. The "XSP4" web server cannot be started.

從 tty 運行 xsp4 時,它給出以下內容:

Missing method
System.Configuration.IConfigurationSectionHandler::Create(object,object,XmlNode)
in assembly /usr/lib/mono/4.0/System.dll, referenced in assembly
/usr/lib/mono/4.0/System.Configuration.dll Exception caught during
reading the configuration file: System.MissingMethodException: Method
not found: 'System.Configuration.IConfigurationSectionHandler.Create'.
at
System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection
(System.String configKey) [0x00000] in <filename unknown>:0    at
System.Configuration.ConfigurationManager.GetSection (System.String
sectionName) [0x00000] in <filename unknown>:0    at
System.Configuration.ConfigurationManager.get_AppSettings () [0x00000]
in <filename unknown>:0    at
Mono.WebServer.XSP.Server.get_AppSettings () [0x00000] in <filename
unknown>:0    at Mono.WebServer.XSP.Server+ApplicationSettings..ctor
() [0x00000] in <filename unknown>:0  xsp4 Listening on address:
0.0.0.0 Root directory: /home/tarik/Documents/Courses/Mono/ASP.NET/FirstApp Error:
System.TypeInitializationException: An exception was thrown by the
type initializer for System.Net.Sockets.Socket --->
System.InvalidCastException: Cannot cast from source type to
destination type.   at System.Net.Sockets.Socket.CheckProtocolSupport
() [0x00000] in <filename unknown>:0    at
System.Net.Sockets.Socket..cctor () [0x00000] in <filename unknown>:0 
--- End of inner exception stack trace ---   at Mono.WebServer.XSPWebSource.CreateSocket () [0x00000] in <filename
unknown>:0    at Mono.WebServer.ApplicationServer.Start (Boolean
bgThread) [0x00000] in <filename unknown>:0    at
Mono.WebServer.ApplicationServer.Start (Boolean bgThread,
System.Exception initialException) [0x00000] in <filename unknown>:0  
at (wrapper remoting-invoke-with-check)
Mono.WebServer.ApplicationServer:Start (bool,System.Exception)   at
Mono.WebServer.XSP.Server.RealMain (System.String[] args, Boolean
root, IApplicationHost ext_apphost, Boolean quiet) [0x00000] in
<filename unknown>:0

答案1

有時安裝“mono-complete”會修復一些錯誤。如果您尚未安裝它,請嘗試這樣做。

相關內容