2014-02-12 39 views
1

目前我正在測試一個Mono WCF主機,它可以接收json post。我在Mono3.2上發現,如果發送一個沒有「Content-Type」的頭(通過Fiddler),就像這樣,它立即崩潰。Mono WCF webHttpBinding崩潰

User-Agent: Fiddler 
Host: myIP:myPort 
Content-Length: 1 

例外情況如下。

Missing method Mono.Security.Protocol.Tls.SslServerStream::.ctor(Stream,X509Certificate,bool,bool,bool) in assembly G:\share\DaGeneral\Overseer CLI HOST\bin\Debug\Mono.Security.dll, referenced in assembly F:\Mono-3.2.3\lib\mono\gac\System\4.0.0.0__b77a5c561934e089\System.dll 

Unhandled Exception: 
System.MissingMethodException: Method not found: 'Mono.Security.Protocol.Tls.SslServerStream..ctor'. 

    at System.Net.EndPointListener.OnAccept (System.Object sender, System.EventArgs e) [0x00099] in C:\cygwin\sources\mono\mcs\class\System\System.Net\EndPointListener.cs:128 

    at System.Net.Sockets.SocketAsyncEventArgs.OnCompleted (System.Net.Sockets.SocketAsyncEventArgs e) [0x00014] in C:\cygwin\sources\mono\mcs\class\System\System.Net.Sockets\SocketAsyncEventArgs.cs:177 

    at System.Net.Sockets.SocketAsyncEventArgs.AcceptCallback (IAsyncResult ares) [0x00077] in C:\cygwin\sources\mono\mcs\class\System\System.Net.Sockets\SocketAsyncEventArgs.cs:290 

    at System.Net.Sockets.SocketAsyncEventArgs.DispatcherCB (IAsyncResult ares) [0x00084] in C:\cygwin\sources\mono\mcs\class\System\System.Net.Sockets\SocketAsyncEventArgs.cs:230 

毫無疑問,如果一個程序關閉,這可能是一個巨大的隱患。 有什麼幫助嗎?乾杯。

回答

1

答案是文件「Mono.Security.Dll」是一個錯誤的編譯版本。 下載它的單聲道版本可以解決這個問題。