使用MonoTouch在iPhone上捕获wcf-exceptions

时间:2012-10-24 14:58:53

标签: ios wcf xamarin.ios

我遇到了服务器上抛出异常并在客户端(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,但仍然遇到错误。

任何想法我可能做错了什么?

0 个答案:

没有答案