1

我一直遇到服务器上抛出异常并在客户端(iPhone)上捕获它们的问题。

服务的接口有一个用

[FaultContract(typeof(SecurityException))]

在该方法中,我抛出了一个 SecurityException。在电话上,我收到以下错误:

{System.Net.WebException: Error getting response stream (ReadDone1): ReceiveFailure 
---> System.IO.IOException: EndRead failure 
---> System.Net.Sockets.SocketException: Connection reset by peer   
at System.Net.Sockets.Socket.EndReceive (IAsyncResult result) [0x0002d] in /Developer/MonoTouch/Source/mono/mcs/class/System/System.Net.Sockets/Socket_2_1.cs:1979
at System.Net.Sockets.NetworkStream.EndRead (IAsyncResult ar) [0x0002f] in /Developer/MonoTouch/Source/mono/mcs/class/System/System.Net.Sockets/NetworkStream.cs:338    --- End of inner exception stack trace ---   
at System.Net.Sockets.NetworkStream.EndRead (IAsyncResult ar) [0x0003d] in /Developer/MonoTouch/Source/mono/mcs/class/System/System.Net.Sockets/NetworkStream.cs:340    
at System.Net.WebConnection.ReadDone (IAsyncResult result) [0x0002a] in /Developer/MonoTouch/Source/mono/mcs/class/System/System.Net/WebConnection.cs:429    --- End of inner exception stack trace ---   
at System.Net.HttpWebRequest.EndGetResponse (IAsyncResult asyncResult) [0x0005e] in /Developer/MonoTouch/Source/mono/mcs/class/System/System.Net/HttpWebRequest.cs:852
at System.ServiceModel.Channels.HttpRequestChannel.GotResponse (IAsyncResult result) [0x0001f] in /Developer/MonoTouch/Source/mono/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpRequestChannel.cs:218 }

现在我浏览了关于这个的问题,似乎这个错误已经被报告并在 monotouch 版本中修复。我正在使用最新 (6.0.4) 版本的 monotouch,但仍然遇到错误。

有什么想法我可能做错了吗?

4

0 回答 0