zoukankan      html  css  js  c++  java
  • WCF 遇到 由于线程退出或应用程序请求,已放弃 I/O 操作 ListenerContextInputStream

    异常类型:IOException
    异常消息:An exception has been thrown when reading the stream.
    异常信息:   at System.ServiceModel.Dispatcher.StreamFormatter.MessageBodyStream.Read(Byte[] buffer, Int32 offset, Int32 count)
       at PosServer.Service.SystemExtend.ReadBytes(Stream stream)
       at PosServer.Service.PosService.4(Stream inputStream, WebOperationContext wctx, String className, String actionName, Boolean compressData)
    InnerException异常类型:CommunicationException
    异常消息:由于线程退出或应用程序请求,已放弃 I/O 操作。
    异常信息:   at System.ServiceModel.Channels.HttpRequestContext.ListenerHttpContext.ListenerContextHttpInput.ListenerContextInputStream.Read(Byte[] buffer, Int32 offset, Int32 count)
       at System.ServiceModel.Channels.MaxMessageSizeStream.Read(Byte[] buffer, Int32 offset, Int32 count)
       at System.ServiceModel.Channels.DetectEofStream.Read(Byte[] buffer, Int32 offset, Int32 count)
       at System.ServiceModel.Channels.HttpStreamXmlDictionaryReader.ReadContentAsBase64(Byte[] buffer, Int32 index, Int32 count)
       at System.ServiceModel.Dispatcher.StreamFormatter.MessageBodyStream.Read(Byte[] buffer, Int32 offset, Int32 count)

    这个问题目前已知仅在WIN SERVER 2003系统上遇到过。

    微软上有相关解决方案:

    https://support.microsoft.com/en-us/kb/3137046

    System.Net.HttpListenerTimeoutManager.MinSendBytesPerSecond属性是.NET 4.5新增加的。

    .NET 4.5 又不可能装在WIN SERVER 2003 上。只能让客户用更高版本的系统。

    高版本系统,VISTA及以上,却从未遇到过“由于线程退出或应用程序请求,已放弃 I/O 操作”这种问题反馈。

    只能让客户找另一台电脑来装这个WCF程序了。

  • 相关阅读:
    java集合
    移动web页面给用户发送邮件的方法
    如何用CSS和jQuery实现一个侧滑导航菜单
    基于jq的表单填充
    使用JS代码实现点击按钮下载文件
    变量,作用域和内存问题
    如何实现单行/多行文本溢出的省略(...)
    CSS中浮动和定位对元素宽度/外边距/其他元素所占空间的影响
    【javascript】函数中的this的四种绑定形式
    前端开发利器webStorm
  • 原文地址:https://www.cnblogs.com/runliuv/p/5956598.html
Copyright © 2011-2022 走看看