Facebook Wrap Exception Wrapper

时间:2013-09-18 21:21:45

标签: facebook exception facebook-c#-sdk facebook-apps targetinvocationexception

我正在使用Facebook应用程序将Facebook状态和图像从Facebook页面显示到我的Windows 8应用程序,但我每次都获得目标调用异常,虽然我有一个尝试捕获,但我不知道如何摆脱这个例外。内部异常是Facebook Wrap Exception Wrapper。有任何想法吗?这是我的调用堆栈:

System.Reflection.TargetInvocationException was unhandled
HResult=-2146232828
Message=An exception occurred during the operation, making the result invalid.  Check InnerException for exception details.
  Source=System
  StackTrace:
   at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary()
   at Facebook.OpenReadCompletedEventArgs.get_Result()
   at Facebook.Client.FacebookSessionClient.<SendAnalytics>b__0(Object o, OpenReadCompletedEventArgs e)
   at Facebook.HttpHelper.OnOpenReadCompleted(OpenReadCompletedEventArgs args)
   at Facebook.HttpHelper.ResponseCallback(IAsyncResult asyncResult, Object userToken)
   at Facebook.HttpHelper.<>c__DisplayClass2.<OpenReadAsync>b__0(IAsyncResult ar)
   at System.Net.LazyAsyncResult.Complete(IntPtr userToken)
   at System.Net.ContextAwareResult.CompleteCallback(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Net.ContextAwareResult.Complete(IntPtr userToken)
   at System.Net.LazyAsyncResult.ProtectedInvokeCallback(Object result, IntPtr userToken)
   at System.Net.HttpWebRequest.SetResponse(Exception E)
   at System.Net.HttpWebRequest.SetAndOrProcessResponse(Object responseOrException)
   at System.Net.ConnectionReturnResult.SetResponses(ConnectionReturnResult returnResult)
   at System.Net.Connection.CompleteConnectionWrapper(Object request, Object state)
   at System.Net.PooledStream.ConnectionCallback(Object owningObject, Exception e, Socket socket, IPAddress address)
   at System.Net.ServicePoint.ConnectSocketCallback(IAsyncResult asyncResult)
   at System.Net.LazyAsyncResult.Complete(IntPtr userToken)
   at System.Net.ContextAwareResult.Complete(IntPtr userToken)
   at System.Net.LazyAsyncResult.ProtectedInvokeCallback(Object result, IntPtr userToken)
   at System.Net.Sockets.Socket.ConnectCallback()
   at System.Net.Sockets.Socket.RegisteredWaitCallback(Object state, Boolean timedOut)
   at System.Threading._ThreadPoolWaitOrTimerCallback.PerformWaitOrTimerCallback(Object state, Boolean timedOut)
  InnerException: Facebook.WebExceptionWrapper
   HResult=-2146233088
   Message=Unable to connect to the remote server
       InnerException: System.Net.Sockets.SocketException
        HResult=-2147467259
        Message=A connection attempt failed because the connected party did not properly respond after a period of time or established connection failed because connected host has failed to respond 31.13.81.1:443
        Source=System
        ErrorCode=10060
        NativeErrorCode=10060
        StackTrace:
             at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
             at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
        InnerException: 

2 个答案:

答案 0 :(得分:1)

这是Facebook.Client中已知的错误,在其GitHub存储库中修订了此修订版:

https://github.com/facebook-csharp-sdk/facebook-winclient-sdk/commit/93f4c6498f32792d52fdb46d80d0c68435744c47

要摆脱这个错误,请从最新的来源构建Facebook.Client,而不是通过NuGet下载它。您也可以尝试联系http://facebooksdk.net的人并要求他们更新Facebook.Client的NuGet版本。

答案 1 :(得分:1)

New nuget已经推出了修复程序。感谢。