Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/329.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# PushSharp:无法将数据写入传输连接_C#_.net_Sockets_Apple Push Notifications_Pushsharp - Fatal编程技术网

C# PushSharp:无法将数据写入传输连接

C# PushSharp:无法将数据写入传输连接,c#,.net,sockets,apple-push-notifications,pushsharp,C#,.net,Sockets,Apple Push Notifications,Pushsharp,我正在使用PushSharp 4.0.10发送iOS推送通知,但我最近注意到,托管代理的控制台应用程序在发送一些通知后崩溃,并收到以下错误消息: [错误]APNS-CLIENT[1]:发送批处理错误:批处理ID=4,错误 or=System.IO.IOException:无法将数据写入传输 连接:远程服务器已强制关闭现有连接 主持人。-->System.Net.Socket ts.SocketException:现有连接 被远程医院强行关闭 位于的System.Net.Sockets.Socke

我正在使用PushSharp 4.0.10发送iOS推送通知,但我最近注意到,托管代理的控制台应用程序在发送一些通知后崩溃,并收到以下错误消息:

[错误]APNS-CLIENT[1]:发送批处理错误:批处理ID=4,错误 or=System.IO.IOException:无法将数据写入传输 连接:远程服务器已强制关闭现有连接 主持人。-->System.Net.Socket ts.SocketException:现有连接 被远程医院强行关闭 位于的System.Net.Sockets.Socket.EndSend(IAsyncResult asyncResult) System.Net.Sockets.NetworkStream.EndWrite(IAsyncResult asyncResult)
---内部异常堆栈跟踪结束---在System.Net.Security.\u SslStream.EndWrite(IAsyncResult asyncResult)
在System.Net.Security.SslStream.EndWrite(IAsyncResult asyncResult)
在 System.IO.Stream.c\uuu显示类0.b\uu 17(流 strea m,IAsyncResult异步结果)位于 System.Threading.Tasks.TaskFactory
1.FromAsyncTrimPromise
1.Complete(TInst ance thisRef,Func
3 endMethod,IAsyncResult asyncResult,布尔型
要求(同步)
---来自引发异常的上一个位置的堆栈结束跟踪---在
System.Runtime.CompilerServices.TaskWaiter.ThrowForNonSuccess(任务
任务)在
System.Runtime.CompilerServices.TaskWaiter.HandleNonSuccessAndDebuggerNot
通知(任务)在
System.Runtime.CompilerServices.TaskWaiter.ValidateEnd(任务任务)
在PushSharp.Apple.ApnsConnection.d_u21.MoveNext()中 2016-04-07 12:09:52.PM[错误]APNS客户端[1]:读卡器异常: System.IO.IOException:无法从传输中读取数据 连接:中的软件中止了已建立的连接 您的主机。-->System.Net.Sockets.S SocketException:一个 已建立的连接已被您ho st中的软件中止 位于System.Net.Sockets.Socket.BeginReceive(字节[]缓冲区)的计算机, Int32偏移量、Int32大小、SocketFlags SocketFlags、AsyncCallback 回调,对象状态)在 System.Net.Sockets.NetworkStream.BeginRead(字节[]缓冲区,Int32 偏移量,t32大小,异步回调,对象状态)-结束 内部异常堆栈跟踪的类型---at System.Net.Sockets.NetworkStream.BeginRead(字节[]缓冲区,Int32 偏移量,t32大小,异步回调,对象状态)位于 System.Net.FixedSizeReader.StartReading()位于 System.Net.Security.\u ssStream.StartFrameHeader(字节[]缓冲区,Int32 偏移量t、Int32计数、异步协议请求(异步请求) System.Net.Security.\u ssStream.StartReading(字节[]缓冲区,Int32 偏移量,I nt32计数,异步协议请求(异步请求) System.Net.Security.\u ssStream.ProcessRead(字节[]缓冲区,Int32 偏移量,在t32计数中,异步协议请求(异步请求) System.Net.Security.\u ssStream.BeginRead(字节[]缓冲区,Int32偏移量, Int3 2计数,异步回调,异步回调,对象异步状态) System.Net.Security.SslStream.BeginRead(字节[]缓冲区,Int32偏移量, Int32计数、异步回调、异步回调、对象异步状态)位于 System.IO.Stream.c\uuu显示类0.b\uu 7(流 流,读写参数参数,异步回调,对象 国家)在 System.Threading.Tasks.TaskFactory
1.FromAsyncTrim[TInstance,TArgs](TInsta nce thisRef,targets args,Func
5 beginMethod,Func
3 endMethod)位于
System.IO.Stream.BeginEndarAsync(字节[]缓冲区,Int32偏移量,Int32
在System.IO.Stream.ReadAsync(字节[]缓冲区,Int32偏移量,
Int32计数,取消安装令牌(取消令牌)
System.IO.Stream.ReadAsync(字节[]缓冲区,Int32偏移量,Int32计数)
在PushSharp.Apple.ApnsConnection.d_u23.MoveNext()中 ---来自引发异常的上一个位置的堆栈结束跟踪---在 System.Runtime.CompilerServices.TaskWaiter.ThrowForNonSuccess(任务 任务)在 System.Runtime.CompilerServices.TaskWaiter.HandleNonSuccessAndDebuggerNot 通知(任务)在 System.Runtime.CompilerServices.TaskWaiter.ValidateEnd(任务任务)
在PushSharp.Apple.ApnsConnection.d_u21.MoveNext()中 2016-04-07 12:09:59.PM[错误]APNS-CLIENT[1]:发送批错误:批 ID=6,Err或=System.NullReferenceException:未设置对象引用 指向对象的实例。在 位于的PushSharp.Apple.ApnsConnection.createBatch(列表'1 toSend') PushSharp.Apple.ApnsConnection.d_u21.MoveNext()

未处理的异常:System.NullReferenceException:对象引用 未设置为对象的实例。在 PushSharp.Apple.ApnsConnection.d_u21.MoveNext() ---来自引发异常的上一个位置的堆栈结束跟踪---在 System.Runtime.CompilerServices.TaskWaiter.ThrowForNonSuccess(任务 任务)在 System.Runtime.CompilerServices.TaskWaiter.HandleNonSuccessAndDebuggerNot 通知(任务)在 PushSharp.Apple.ApnsConnection.d.MoveNext() ---来自引发异常的上一个位置的堆栈结束跟踪---在 System.Runtime.CompilerServices.AsyncMethodBuilderCore.c\uu DisplayClass2。 b__5(对象状态)在 System.Threading.QueueUserWorkItemCallback.WaitCallback\u上下文(对象 (站)在 System.Threading.ExecutionContext.RunInternal(ExecutionContext executionCo-Context、ContextCallback回调、对象状态、布尔值 在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext、C ContextCallback、对象状态、布尔值 在 System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWor kItem.ExecuteWorkItem()位于 位于的System.Threading.ThreadPoolWorkQueue.Dispatch() System.Threading.\u ThreadPoolWaitCallback.PerformWaitCallback()

知道为什么会这样吗?这与并发连接有关吗?如果是,PushSharp自己不处理吗