访问WebServcie遇到配额不足的时候,请增加配额
常常遇到的报错:
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,
错误二:
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中修改为:
<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>
访问WebServcie遇到配额不足的时候,请增加配额的更多相关文章
- 已超过传入消息(65536)的最大消息大小配额。若要增加配额,请使用相应绑定元素上的 MaxReceivedMessageSize 属性。
错误:已超过传入消息(65536)的最大消息大小配额.若要增加配额,请使用相应绑定元素上的 MaxReceivedMessageSize 属性. 或者 错误:反序列化操作“GetAllUserData ...
- 调用WCF时,调用已超过传入消息(65536)的最大消息大小配额。若要增加配额,请使用相应绑定。
解决方案: 其实只要在客户端配置文件中加上如下紫色粗体属性( maxReceivedMessageSize): <?xml version="1.0" encoding=&q ...
- WebService 之 已超过传入消息(65536)的最大消息大小配额。若要增加配额,请使用相应绑定元素上的 MaxReceivedMessageSize 属性。
在使用 WCF 中,遇到如下问题: 已超过传入消息(65536)的最大消息大小配额.若要增加配额,请使用相应绑定元素上的 MaxReceivedMessageSize 属性. 问题说明: 客户端调用 ...
- WORKGROUP无法访问,您可能没有权限使用网络资源,请与这台服务器的管理员联系以....
解决方法 1.启用Guest账号 在很多情况下,为了本机系统的安全,Guest账户是被禁用的,这样就无法访问该机器的共享资源,因此必须启用Guest账户. 笔者以Windows XP系统为例进行介绍. ...
- WCF已超过传入消息(65536)的最大消息大小配额。若要增加配额,请使用相应绑定元素上的 MaxReceivedMessageSize 属性
<?xml version="1.0" encoding="utf-8"?> <configuration> <connectio ...
- WCF 已超过传入消息(65536)的最大消息大小配额。若要增加配额,请使用相应绑定元素上的 MaxReceivedMessageSize 属性
我出现这个问题主要是服务器返回数据量过大引起了,需要客户端服务端都要进行配置:我会说其实有神器的么....(工具=>wcf服务配置编辑器),用工具编辑下,就会完全搞定这个问题,再也不用纠结了 服 ...
- WCF请求数据:已超过传入消息(65536)的最大消息大小配额。若要增加配额,请使用相应绑定元素上的 MaxReceivedMessageSize 属性。
通常情况下,写好WCF服务后都会用自带的WCFClient工具进行测试,在进行时数据请求的时候,如果返回数据量超过默认接收值的时候就会提示如图异常错误. 错误也提示的很清楚,无非就是修改接收值大小的问 ...
- System.ServiceModel.CommunicationException: 已超过传入消息(65536)的最大消息大小配额。若要增加配额,请使用相应绑定元素上的 MaxReceivedMessageSize 属性。
- TP3.2 APP_DEBUG=false关闭调试后访问不了。页面错误!请稍后再试~
在APP_DEBUG=true时是没问题的,在APP_DEBUG=false时才会出现找不到模板的问题. 经过排查可能是模板文件找不到问题,之前是这么写的. 改为这个就好了. ----------- ...
随机推荐
- MVC之Model元数据
Contronoller激活之后,ASP.NET MVC会根据当前请求上下文得到目标Action的名称,然后解析出对应的方法并执行之. 在整个Action方法的执行过程中,Model元数据的解析是一个 ...
- C#调用非托管dll--路径问题
DllImport会按照顺序自动去寻找的地方:1.exe所在目录(一般在bin目录下)2.System32目录3.环境变量目录所以只需要你把引用的DLL 拷贝到这三个目录下 就可以不用写路径了或者可以 ...
- CentOS6开启BBR加速
BBR TCP加速,Google出品神器,需 kernel 4.9以上.开启后服务器的访问明显快很多,对于vultr和digitalocean这种国外服务器很适合,感觉使用后Shell输入也没那么卡了 ...
- 学JS的心路历程-JS支持面向对象?(一)
昨天在看Prototype看到JS支持面向对象,被前辈问到说那什么是面向对象?JS是面向对象语言吗? 便开始了一连串艰辛爬文过程,今天就来看一下两者有什么差异吧(rgwyjc)! 首先面向对象有三大特 ...
- UMD模式的js
(function (root, factory) { if (typeof define === 'function' && define.amd) { // AMD define( ...
- 2018面向对象程序设计(Java)第11周学习指导及要求
2018面向对象程序设计(Java)第11周学习指导及要求 (2018.11.8-2018.11.11) 学习目标 (1) 掌握Vetor.Stack.Hashtable三个类的用途及常用API: ...
- Excel批量修改文件
[1]把下图片放在一个文件目录下面,如E:\SVM_Class\airplanes [2]点击“开始”→“运行”(或按快捷键win+R),在弹出框中输入“cmd”,进入dos操作界面. [3]do ...
- Mono vs IL2CPP
[Mono vs IL2CPP] 参考:http://blog.csdn.net/gz_huangzl/article/details/52486255
- Numeric Type Attributes
[Numeric Type Attributes] INT(4) specifies an INT with a display width of four digits. This optiona ...
- linus jsch文件下载
package com.osplat.util;import java.io.File;import java.io.FileNotFoundException;import java.io.File ...