.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Jean Paul
ASPEvil
SP
satyapriyanayak
Ashutosh Jha
Post New Web Links

WCF: The maximum message size quota for incoming messages (65536) has been exceeded

Posted By: DigiMortal     Posted Date: November 01, 2010    Points: 0   Category :ASP.Net
 

When using WCF services you may get the following error: "The maximum message size quota for incoming messages (65536) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element." This error is given because of size limits set to responses in your application configuration.

You need to increase the value of two limiting parameters: maxBufferSite and maxReceivedMessageSize. In my example these values are set to 5000000.


<?xml version="1.0" encoding="utf-8"


View Complete Post


More Related Resource Links

The maximum message size quota for incoming messages (65536) has been exceeded.

  

I'm at my wit's end trying to resolve this error.  I am accessing a WCF Service with a Silverlight 4 application.  I have no issues retrieving large amouts of data from the service, but whenever I try to send it back to the service, I get thsi error.  Endless Bing seaches return essentially the same solution, but nothing seems to resolve it.  Below is my web.config:

<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="">
<serviceMetadata httpGetEnabled="true" />

Maximum message size quota for incoming messages (65536) error

  

Currently I'm developing a windows phone 7 application which accesses web service. However, when I accesses the web service there's an error said :

"The maximum message size quota for incoming messages (65536) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element."

Yes, I have tried to modify the MaxReceivedMessageSize property in the ServiceReferences.ClientConfig, but it seems the application turn it back to default size when we accessing the web service.

ServiceReferences.ClientConfig :

<configuration>
    <system.serviceModel>
        <bindings>
            <basicHttpBinding>
                <binding name="Contracts277001Soap" maxBufferSize="2147483647"
                    maxReceivedMessageSize="2147483647">
                    <security mode="None" />
      

WCF To WM6 Maximum Message Size Quota Error

  

Hello,

I am having some trouble with an error message that keeps popping up on a handheld application. It says 'The maximum message size quota for incoming messages (65536) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element.'

The app talks to a WCF service I've created and after googling around a bit, I discovered the MaxReceivedMessageSize value needed to be set.  However, after doing so in WCF service and setting the bindingConfiguration property to the correct binding element, the same message appears on the handheld.  The handheld app has no binding elements within the .config file and I tried adding the same binding data to this config file but the handheld crashes. What should I do?

Here's the server config binding data:

 <system.serviceModel>

  <diagnostics wmiProviderEnabled="false">
   

The maximum string content length quota (8192) has been exceeded while reading XML data.

  
Hi, I have been working on implementing a WCF service and have run into this problem with the maxStringContentLength.  I have read a bunch of posts here on how to correct it and none of them have worked.  I have updated my web.config in my local IIS5 published service to be maxStringContentLength="2147483647" and have updated my application's app.config to be maxStringContentLength="2147483647".  I delete all DLL's, rebuild, restart IIS, make sure all VS 2008 virtual webs are stopped, republish multiple times...even reboot my machine and I continually receive the following error message:The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://tempuri.org/qlStatement. The InnerException message was 'There was an error deserializing the object of type System.String. 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 171, position 35.'.  Please see InnerException for more details.I am running the service on my local machine: Win XP SP2, IIS5, .Net 3.5, VS 2008Here is my WCF service's servicemodel section of the web.config:    <system.serviceModel>    <bindings>      <wsHt

The Maximum String contenet length quota(8192) has been exceeded while reading xml data

  
Hi,
I am using WCF service and calling in vb6.0 application.
I am using typed contract moniker object to access the services from VB6.0. Everything working fine.
Problem:
Service hosted in windows service using nettcp binidng. Service method return type is XMl string. While I try to access the method I am getting the error message "The Maximum String contenet length quota(8192) has been exceeded while reading xml data". I have modifed readerquota Service appconfig file and svcutil.exe generated client config file.
I put the client config fiel in vb application exe folder.

I have mentioned the Bindingconfiguration name also.


When I changed the cleint config file with junk data vb application giving the  same error. I am not sure whether VB 6.o using client config file.

Please help me.


<binding name="NetTcpBindingEndpoint" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions" hostNameComparisonMode="StrongWildcard" listenBacklog="10" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxConnections="10" maxReceivedMessageSize

The maximum string content length quota (8192) has been exceeded while reading XML data.

  

 Hi, Im getting the error when I am sending the large message to WCF service, I've seen previous post regarding the same prob and tried all the possibilities but still facing the problem.
Changed the reader quotas values of Client config and service config but no help.

Also tried by adding the below code in client and service  

 

 BasicHttpBinding basicBinding = new BasicHttpBinding();
        basicBinding.MaxBufferSize = Int32.MaxValue;
        basicBinding.MaxReceivedMessageSize = Int32.MaxValue;
        basicBinding.MaxBufferPoolSize = Int32.MaxValue;

        XmlDictionaryReaderQuotas myReaderQuotas = new XmlDictionaryReaderQuotas();
        myReaderQuotas.MaxStringContentLength = Int32.MaxValue;
        myReaderQuotas.MaxArrayLength = Int32.MaxValue;
        myReaderQuotas.MaxBytesPerRead = Int32.MaxValue;
        myReaderQuotas.MaxDepth = Int32.MaxValue;
        myReaderQuotas.MaxNameTableCharCount = Int32.MaxValue;

But still facing the issue.

Here is my

"The maximum string content length quota (8192) has been exceeded while reading XML data. "

  
I keep getting this when I send a ton of text over the line... and this is SMALL compared to some of the text I want to move.  Any ideas?

The formatter threw an exception while trying to deserialize the message: Error in deserializing body of request message for operation 'UpdateBlogEntry'. 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 180, position 518.

The maximum string content length quota (8192) has been exceeded while reading XML data.

  

I'm getting this message when invoke an operation on the service.

I have the readerQuotas configured in the client's config file as follows:

<readerQuotas maxDepth="32" maxStringContentLength="2048000" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />

I

The maximum array length quota (16384) has been exceeded while reading XML data.

  

 

I am getting this error when I try to send a message to my service. I have updated the ReaderQuotas on both the client and the server. Is there something else that I need to do to get the service to accept the message?

 

-paul


DIME: Sending Files, Attachments, and SOAP Messages Via Direct Internet Message Encapsulation

  

Direct Internet Message Encapsulation (DIME) is a new specification for sending and receiving SOAP messages along with additional attachments, like binary files, XML fragments, and even other SOAP messages, using standard transport protocols like HTTP. In this article, the author explains what DIME is and how it differs from MIME encapsulation. A detailed description of the message format and how it is parsed, as well as working with SOAP and extending it with WSDL, is also included.

Jeannine Hall Gailey

MSDN Magazine December 2002


Make WCF use namespace prefixes to decrease message size

  
Is there a way for a WCF client to use namespace prefixes as much as possible, in the sake of decreasing message size. Here is a sample:  <s:Body u:Id="_3" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">    <ValidateRequest xmlns="http://www.company.com/xml/xsd/ValidationServiceMessages">      <EmailList>        <EmailAddress xmlns="http://www.company.com/xml/xsd/ValidationTypes">michael.logan@vita.virginia.gov</EmailAddress>        <EmailAddress xmlns="http://www.company.com/xml/xsd/ValidationTypes">mike.logan@@vita.com</EmailAddress>        <EmailAddress xmlns="http://www.company.com/xml/xsd/ValidationTypes">mike</EmailAddress>      </EmailList>      <ZipCodeList>        <ZipCode xmlns="http://www.company.com/xml/xsd/ValidationTypes">90210</ZipCode>        <ZipCode xmlns="http://www.company.com/xml/xsd/ValidationTypes">23838</ZipCode>        <ZipCode xmlns="http://www.company.com/xml/xsd/ValidationTypes">abcde</ZipCode>      </ZipCo

Cannot create a row of size 8068 which is greater than the allowable maximum of 8060

  
SQL2K5, SP3, both DB's in 2005 compatability mode. I have the same table in two DB's, that are on the same server. The table in both DB's appears identicle. However, on one of them we get the above error when attempting to do an Insert into the table, and one of them works fine. In 2000, the answer was to "use TEXT", but per BOL 2005, that data type is going away. All ideas are appreciated. CREATE   TABLE [dbo].[Complaint]( [ComplaintId] [int] IDENTITY(1,1) NOT NULL, [SourceId] [smallint] NULL, [MethodId] [smallint] NULL, [Location] [nvarchar] (50) NULL, [CurrentStatusId] [smallint] NOT NULL, [CreateDate] [datetime] NOT NULL, [CreateOpid] [char] (8) NOT NULL, [LastUpdateDate] [datetime] NOT NULL, [LastUpdateOpid] [char] (8) NOT NULL, [DESSiteCodeId] [smallint] NULL, [DESAdminId] [smallint] NULL, [Narrative] [nvarchar] (max) NULL,   CONSTRAINT [PK_Complaint] PRIMARY KEY CLUSTERED ( [ComplaintId] ASC )   WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] )   ON [PRIMARY] GO insert   into [dbo].[Complaint] (   Narrative,CurrentStatusId,CreateDate, CreateOpid ,LastUpdateDate,LastUpdateOpid) values   ('abc' ,1,current_timestamp,'dennis',current_timestamp,'dennis' ) TIA, ChrisRDBA

Database Mail configuring the maximum mail size (not attachment 'MaxFileSize')

  
Hi can anyone tell me if it's possible to configure the maximum size of an email when using database mail?  I know it's possible to use sysmail_configure_sp to set 'MaxFileSize', I want to prevent an email being sent the size of the body of the email is very large. In my case the body is based on a query result set inserted as html. Thanks      
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend