常常遇到的报错:

1.错误一:

Error in deserializing body of reply message for operation 'GetArticleInfo'.,StackTrace=
Server stack trace:
at System.ServiceModel.Dispatcher.XmlSerializerOperationFormatter.DeserializeBody(XmlDictionaryReader reader, MessageVersion version, XmlSerializer serializer, MessagePartDescription returnPart, MessagePartDescriptionCollection bodyParts, Object[] parameters, Boolean isRequest)
at System.ServiceModel.Dispatcher.XmlSerializerOperationFormatter.DeserializeBody(XmlDictionaryReader reader, MessageVersion version, String action, MessageDescription messageDescription, Object[] parameters, Boolean isRequest)
at System.ServiceModel.Dispatcher.OperationFormatter.DeserializeBodyContents(Message message, Object[] parameters, Boolean isRequest)
at System.ServiceModel.Dispatcher.OperationFormatter.DeserializeReply(Message message, Object[] parameters)
at System.ServiceModel.Dispatcher.ProxyOperationRuntime.AfterReply(ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at sunflower.ui.web.KbaseServiceReference.KbaseWebServicesSoap.GetArticleInfo(String itemId, String dBType, String dBName)
at sunflower.ui.web.Utils.ArticleKbaseUtils.GetArticleViewModel(String filename, String dbType),Source=mscorlib,

错误二:

The formatter threw an exception WHILE trying TO deserialize the message: There was an error WHILE trying TO deserialize parameter http://tempuri.org/:GetArticleInfoResponse. The InnerException message was 'There was an error deserializing the object of type sun.ui.web.baseServiceReference.GetArticleInfoResponseBody. The maximum string content length quota (8192) has been exceeded while reading XML data. This quota may be increased by changing the MaxStringContentLength property on the XmlDictionaryReaderQuotas object used when creating the XML reader. Line 1, position 17144.'.  Please see InnerException FOR more details.,StackTrace=
SERVER stack trace: 
   AT System.ServiceModel.Dispatcher.DataContractSerializerOperationFormatter.DeserializeParameterPart(XmlDictionaryReader reader, PartInfo part, BOOLEAN isRequest)
   AT System.ServiceModel.Dispatcher.DataContractSerializerOperationFormatter.DeserializeParameter(XmlDictionaryReader reader, PartInfo part, BOOLEAN isRequest)
   AT System.ServiceModel.Dispatcher.DataContractSerializerOperationFormatter.DeserializeParameters(XmlDictionaryReader reader, PartInfo[] parts, Object[] parameters, BOOLEAN isRequest)
   AT System.ServiceModel.Dispatcher.DataContractSerializerOperationFormatter.DeserializeBody(XmlDictionaryReader reader, MessageVersion VERSION, STRING ACTION, MessageDescription messageDescription, Object[] parameters, BOOLEAN isRequest)
   AT System.ServiceModel.Dispatcher.OperationFormatter.DeserializeBodyContents(Message message, Object[] parameters, BOOLEAN isRequest)
   AT System.ServiceModel.Dispatcher.OperationFormatter.DeserializeReply(Message message, Object[] parameters)
   AT System.ServiceModel.Dispatcher.ProxyOperationRuntime.AfterReply(ProxyRpc& rpc)
   AT System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
   AT System.ServiceModel.Channels.ServiceChannel.Call(STRING ACTION, BOOLEAN oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
   AT System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   AT System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown AT [0]: 
   AT System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   AT System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 TYPE)
   AT sunflower.ui.web.KbaseServiceReference.KbaseWebServicesSoap.GetArticleInfo(GetArticleInfoRequest request)
   AT sunflower.ui.web.KbaseServiceReference.KbaseWebServicesSoapClient.sunflower.ui.web.KbaseServiceReference.KbaseWebServicesSoap.GetArticleInfo(GetArticleInfoRequest request)
   AT sunflower.ui.web.KbaseServiceReference.KbaseWebServicesSoapClient.GetArticleInfo(STRING itemId, STRING dBType, STRING dBName)
   AT sunflower.ui.web.Utils.ArticleKbaseUtils.GetArticleViewModel(STRING filename, STRING dbType),Source=mscorlib,

。。。

我解决此问题采用的办法是修改配置节点为下面的样子,显示声明配额,增大配置值,增加readerQuotas 节点

web.config中修改为:

<system.serviceModel>
    <bindings>
      <basicHttpBinding>
        <binding name="RECInterfaceSoap" />
        <binding name="baseWebServicesSoap" maxBufferPoolSize="2147483647"  maxReceivedMessageSize="2147483647">
          <readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647"/>
        </binding>        
      </basicHttpBinding>
      
    </bindings>
    <client>
      <endpoint address="http://127.0.0.1/service/interface.asmx"
        binding="basicHttpBinding" bindingConfiguration="RECInterfaceSoap"
        contract="ecpServiceReference.RECInterfaceSoap" name="RECInterfaceSoap" />
      <endpoint address="http://127.0.0.1:8470/base/baseWebServices.asmx"
        binding="basicHttpBinding" bindingConfiguration="baseWebServicesSoap"
        contract="baseServiceReference.baseWebServicesSoap" name="baseWebServicesSoap" />
    </client>
    <behaviors>
       <serviceBehaviors>
           <behavior name="baseServiceReference.baseWebServicesSoap">
              <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
              <serviceMetadata httpGetEnabled="true"/>
              <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
              <serviceDebug includeExceptionDetailInFaults="false"/>
              <dataContractSerializer maxItemsInObjectGraph="2147483647"/>     
        </behavior>        
      </serviceBehaviors>     
    </behaviors>
  </system.serviceModel> 

转载于:https://www.cnblogs.com/wangqiideal/p/4936726.html

访问WebServcie遇到配额不足的时候,请增加配额相关推荐

  1. C# WCF WinCE 解决方案 错误提示之:已超过传入消息(65536)的最大消息大小配额。若要增加配额,请使用相应绑定元素上的 MaxReceivedMessageSize 属性...

    C# WCF WinCE 解决方案 错误提示之:已超过传入消息(65536)的最大消息大小配额.若要增加配额,请使用相应绑定元素上的 MaxReceivedMessageSize 属性 网上的解决方案 ...

  2. 小程序访问,提示网络不给力,请稍后再试

    支付宝小程序通过链接跳转访问,提示网络不给力,请稍后再试 猜测原因是,支付宝拉去小程序资源失败,可能是提审过,但是没有线上版本,发布上线一个版本再试

  3. linux磁盘配额步骤详细步骤,Linux磁盘配额命令及步骤.doc

    Linux磁盘配额命令及步骤 实训18 磁盘配额 实训目的 掌握磁盘配额操作方法 掌握磁盘配额的测试命令 编辑:陈可辛老师 操作:叶升辉 更多内容咨询:微博:叶升辉IOT, QQ:11座机电话号码 实 ...

  4. 有一页式系统,其页表存放在内存中. (1)如果对内存的一次存取需要1.5微秒,问实现一次页面访问的存取时间是多少? (2)如果系统增加有快表,平均命中率为85%,.....

    题目: 有一页式系统,其页表存放在内存中. (1)如果对内存的一次存取需要1.5微秒,问实现一次页面访问的存取时间是多少? (2)如果系统增加有快表,平均命中率为85%,当页表项在快表中时,其查找时间 ...

  5. WORKGROUP无法访问,您可能没有权限使用网络资源,请与这台服务器的管理员联系以查明您是否有访问权限。

    "网上邻居"无法互访问题解决方法大全    总结起来基本上有下面的几个: 1,没有共享资源/共享服务未启用. 症状:电脑与电脑间可以Ping通,但无法访问共享资源,在"计 ...

  6. 无法访问xxx指向的web服务器,请检查网络设置

    出现这种情况的几种原因: 1.网站备案 2.*.txt文件没有上传至网站对应的目录 3.服务器防火墙没有关闭,最好是把所有防火墙全部关闭以免造成干扰 有时候token总是报错误,这是因为没有把服务器i ...

  7. 错误提示之:已超过传入消息(65536)的最大消息大小配额。若要增加配额,请使用相应绑定元素上的 MaxReceivedMessageSize 属性...

    1.需要查看 配置文件中的 MaxReceivedSize属性的值,将其调大一些若并重新运行 .若以足够大,可不必调整. 2.在服务配置文件中添加如下信息或者直接在"工具"-&qu ...

  8. 访问ip不在白名单中,请参考FAQ:

    原因是我的主程序没有运行起来,连接数据库的表名写错了.记录一下 程序异常 org.springframework.jdbc.BadSqlGrammarException: StatementCallb ...

  9. linux ftp 配额 quota,linux – vsftpd中的配额?

    以下是您应该采取的步骤: VSFTPD 创建/etc/vsftd.conf文件 #nano /etc/vsftpd.conf listen=YES anonymous_enable=NO local_ ...

  10. MM 维护配额安排 MEQ1 Quota Arrangements (配额协议)

    Purpose 关于配额分配   通过指定每一货源的配额,配额分配将一段期间内的物料总需求分配给某一供货源.该配额指定了总需求中的哪一部分应从指定的货源处采购. 如果存在物料的配额分配,则在货源确认处 ...

最新文章

  1. 夏天和空调_您可以在今年夏天开始学习650项免费的在线编程和计算机科学课程...
  2. rm -fr后的恢复
  3. 如何使用scrapy的item来封装数据
  4. java中长方体的类是什么_编写java程序:定义一个描述长方体的类Box,要求如下...
  5. 一个很Low的通讯录管理系统(但是能用)C/C++单链表实现
  6. Acrobat Reader DC 2020 for mac(最好用的免费PDF阅读器) 2020新增功能
  7. JavaScript中DOM的层次节点(一)
  8. JavaScript视频教程
  9. 阿里矢量图标引入方法
  10. 基于MATLAB的柱状图画法及特殊柱状图画法总结
  11. 华为鸿蒙系统英语报纸_“鸿蒙”系统的英文名叫这个!华为注册的这些名字都该怎么翻译?...
  12. 工作两年简历写成这样,谁要你呀!
  13. 世界地图新西兰_世界地图新西兰的位置在哪里?新西兰与澳大利亚相隔多远?...
  14. 力扣刷题 DAY_81 贪心
  15. 数据结构----二叉树已知先序和中序遍历序列求后序遍历
  16. 深度学习系列24:开源抠图算法
  17. echart 广州3d_echarts绘制3D城市地图
  18. 基于android的电子书阅读器app
  19. 利益风暴 Margin Call (2011)
  20. Node.js 笔记(一) nodejs、npm、express安装

热门文章

  1. JS实现【队列】插队功能
  2. 计算机大赛鼓励语录,鼓励参加比赛的话
  3. Vue视频教程 向军Vue基础教程 共86课
  4. 2016 工作、生活与得失
  5. vant适配移动端750设计稿
  6. [XMAN2018排位赛]AutoKey
  7. 运行python.exe文件出现AttributeError: module ‘moviepy.audio.fx.all‘ has no attribute ‘audio_fadein‘
  8. 转 研发团队绩效评定机制细则。
  9. 滴滴开源 Booster:移动APP质量优化框架
  10. 计算机网络的对学生的利弊英语作文,关于电脑利弊的英语作文