问题描述
已超过传入消息(65536)的最大消息大小配额。若要增加配额,请使用相应绑定元素上的MaxReceivedMessageSize属性。web.config配置文件:<?xmlversion="1.0"?><configuration><appSettings><addkey="aspnet:UseTaskFriendlySynchronizationContext"value="true"/></appSettings><system.web><compilationdebug="true"targetFramework="4.5"/><httpRuntimetargetFramework="4.5"/></system.web><system.serviceModel><bindings></bindings><client></client><behaviors><serviceBehaviors><behavior><!--Toavoiddisclosingmetadatainformation,setthevaluesbelowtofalsebeforedeployment--><serviceMetadatahttpGetEnabled="true"httpsGetEnabled="true"/><!--Toreceiveexceptiondetailsinfaultsfordebuggingpurposes,setthevaluebelowtotrue.Settofalsebeforedeploymenttoavoiddisclosingexceptioninformation--><serviceDebugincludeExceptionDetailInFaults="false"/></behavior></serviceBehaviors></behaviors><protocolMapping><addbinding="basicHttpsBinding"scheme="https"/></protocolMapping><serviceHostingEnvironmentaspNetCompatibilityEnabled="true"multipleSiteBindingsEnabled="true"/></system.serviceModel><system.webServer><modulesrunAllManagedModulesForAllRequests="true"/><!--Tobrowsewebapprootdirectoryduringdebugging,setthevaluebelowtotrue.Settofalsebeforedeploymenttoavoiddisclosingwebappfolderinformation.--><directoryBrowseenabled="true"/></system.webServer></configuration>
解决方案
解决方案二:
右键web.config,编辑WCF配置,设置标准终结点里面有个MaxBufferSize属性
解决方案三:
修改配置文件中<bindings><wsHttpBinding><bindingname="wsHttpBindingCfg"maxReceivedMessageSize="大于65536的值"maxBufferPoolSize=“适当增大”
解决方案四:
那你修改这个参数就行了。<bindings><netTcpBinding><bindingname="aNetTcpBinding"maxBufferSize="2147483647"maxReceivedMessageSize="2147483647"><securitymode="None"><transportclientCredentialType="None"/><messageclientCredentialType="None"/></security><readerQuotasmaxDepth="128"maxStringContentLength="2147483647"maxArrayLength="2147483647"maxBytesPerRead="2147483647"maxNameTableCharCount="2147483647"/></binding></netTcpBinding></bindings>