Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Indigo

The maximum message size quota for incoming messages exceeded

Update your Vista Drivers Update Your Drivers Now!!
 
 
Thread Tools Display Modes
Old 10-10-2007   #1 (permalink)
Abbas
Guest


 

The maximum message size quota for incoming messages exceeded

Hi,

I keep getting the following exception thrown when uploading a 50KB
file (files smaller than that work):

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.

Here is my web.config where I am setting the MaxReceivedMessageSize to
be higher but I still get the same error

<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="CalculatorBinding" maxBufferPoolSize="2000000"
maxReceivedMessageSize="2000000000" >
<security mode="Transport" >
<transport clientCredentialType="Windows" />
</security>
<readerQuotas maxDepth="2000000" maxStringContentLength="2000000"
maxArrayLength="2000000"
maxBytesPerRead="2000000"
maxNameTableCharCount="2000000" />
</binding>
</wsHttpBinding>

</bindings>
<services>
<service
behaviorConfiguration="WCFDemo.CalculatorServiceBehavior"
name="WCFDemo.CalculatorService">
<endpoint address="" binding="wsHttpBinding"
contract="WCFDemo.ICalculator" bindingName="CalculatorBinding" />
<endpoint address="mex" binding="mexHttpBinding"
contract="IMetadataExchange" />

</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="WCFDemo.CalculatorServiceBehavior">

<!-- 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"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>


My System SpecsSystem Spec
Old 10-17-2007   #2 (permalink)
sloan
Guest


 

Re: The maximum message size quota for incoming messages exceeded


Its hard to peck through someone else's config file setup.


Here is what I have, where I've "upped" the named pipe and the
wshttpbinding, and altered that specific setting.





<bindings>


<netNamedPipeBinding>
<binding name="NamedPipeBindingName1"
hostNameComparisonMode="StrongWildcard"
maxBufferSize="1000000"
maxConnections="10"
maxReceivedMessageSize="1000000"
receiveTimeout="00:10:00"
transactionFlow="false">
<security mode="Transport">
</security>
</binding>
</netNamedPipeBinding>



<wsHttpBinding>

<binding name="WSHttpBindingName1" maxReceivedMessageSize="1000000" >

<security mode="None">

<transport clientCredentialType="None" />

<message establishSecurityContext="false" />

</security>

</binding>

</wsHttpBinding>





</bindings>



and


<endpoint
address = "http://localhost:8001/ZebraControllerFascade"
binding = "wsHttpBinding" bindingConfiguration="WSHttpBindingName1"
contract =
"MyCompany.Applications.ZooropaManager.Interfaces.Zebra.Controllers.IZebraController"
Quote:

>
</endpoint>


So you gotta define the binding, and then "call it by name" in the endpoint
setup.


PS

Are you doing it on both the SERVER (host) side AND the client side????

...........


The best thing I've ever figured out is something like this:

<system.diagnostics>
<trace autoflush="true" />
<sources>
<source name="System.ServiceModel"
switchValue="Information, ActivityTracing"
Quote:

>
<listeners>
<add name="sdt"
type="System.Diagnostics.XmlWriterTraceListener"
initializeData= "c:\wutemp\Client1.svclog" />
</listeners>
</source>
</sources>
</system.diagnostics>



and

SvcTraceViewer.exe - Learn It, Know it, Love It

http://wcf.netfx3.com/blogs/wcf_comm...t-love-it.aspx


<system.diagnostics configSource="SystemDiagnostics.config">
</system.diagnostics>

so you have have different deploy strategies ... as in.. you don't want this
stuff on in production (as the normal behavior), but you can easily turn it
on in production if you need to.






"Abbas" <aljamala@xxxxxx> wrote in message
news:1192041134.328451.208460@xxxxxx
Quote:

> Hi,
>
> I keep getting the following exception thrown when uploading a 50KB
> file (files smaller than that work):
>
> 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.
>
> Here is my web.config where I am setting the MaxReceivedMessageSize to
> be higher but I still get the same error
>
> <system.serviceModel>
> <bindings>
> <wsHttpBinding>
> <binding name="CalculatorBinding" maxBufferPoolSize="2000000"
> maxReceivedMessageSize="2000000000" >
> <security mode="Transport" >
> <transport clientCredentialType="Windows" />
> </security>
> <readerQuotas maxDepth="2000000" maxStringContentLength="2000000"
> maxArrayLength="2000000"
> maxBytesPerRead="2000000"
> maxNameTableCharCount="2000000" />
> </binding>
> </wsHttpBinding>
>
> </bindings>
> <services>
> <service
> behaviorConfiguration="WCFDemo.CalculatorServiceBehavior"
> name="WCFDemo.CalculatorService">
> <endpoint address="" binding="wsHttpBinding"
> contract="WCFDemo.ICalculator" bindingName="CalculatorBinding" />
> <endpoint address="mex" binding="mexHttpBinding"
> contract="IMetadataExchange" />
>
> </service>
> </services>
> <behaviors>
> <serviceBehaviors>
> <behavior name="WCFDemo.CalculatorServiceBehavior">
>
> <!-- 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"/>
> </behavior>
> </serviceBehaviors>
> </behaviors>
> </system.serviceModel>
>

My System SpecsSystem Spec
Old 10-18-2007   #3 (permalink)
Joe-P
Guest


 

RE: The maximum message size quota for incoming messages exceeded


It looks like you are hosting the service on IIS. Then in you machine
config or in the root web.config there is an entry for httpRuntime. It has
maxRequestLength attribute which would need to be modified to increase the
size.

"Abbas" wrote:
Quote:

> Hi,
>
> I keep getting the following exception thrown when uploading a 50KB
> file (files smaller than that work):
>
> 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.
>
> Here is my web.config where I am setting the MaxReceivedMessageSize to
> be higher but I still get the same error
>
> <system.serviceModel>
> <bindings>
> <wsHttpBinding>
> <binding name="CalculatorBinding" maxBufferPoolSize="2000000"
> maxReceivedMessageSize="2000000000" >
> <security mode="Transport" >
> <transport clientCredentialType="Windows" />
> </security>
> <readerQuotas maxDepth="2000000" maxStringContentLength="2000000"
> maxArrayLength="2000000"
> maxBytesPerRead="2000000"
> maxNameTableCharCount="2000000" />
> </binding>
> </wsHttpBinding>
>
> </bindings>
> <services>
> <service
> behaviorConfiguration="WCFDemo.CalculatorServiceBehavior"
> name="WCFDemo.CalculatorService">
> <endpoint address="" binding="wsHttpBinding"
> contract="WCFDemo.ICalculator" bindingName="CalculatorBinding" />
> <endpoint address="mex" binding="mexHttpBinding"
> contract="IMetadataExchange" />
>
> </service>
> </services>
> <behaviors>
> <serviceBehaviors>
> <behavior name="WCFDemo.CalculatorServiceBehavior">
>
> <!-- 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"/>
> </behavior>
> </serviceBehaviors>
> </behaviors>
> </system.serviceModel>
>
>
My System SpecsSystem Spec
Old 05-15-2008   #4 (permalink)
Newbie


Join Date: May 2008
This is supposed to be optional but validation doesn't think so.
 
Rep Power: 3
Program.X is on a distinguished road
  Program.X is offline

Re: The maximum message size quota for incoming messages exceeded

We're having a wimilar problem with WCF.

I am trying to wrap a fairly hefty packet of XML into a WCF transmission, the average size of a package would not exceed 100Kb.

On the client I have:

EndpointAddress
endPointAddress = newEndpointAddress(GetEndPointUri());
WSHttpBinding wsHttpBinding = newWSHttpBinding();
wsHttpBinding.MaxBufferPoolSize = 5242880;
wsHttpBinding.MaxReceivedMessageSize = 5242880;
wsHttpBinding.ReaderQuotas.MaxStringContentLength = 5242880;
WebSiteBrokerClient webSiteBrokerClient = newWebSiteBrokerClient(wsHttpBinding, endPointAddress);
// *** authentication gubbins removed ***
WebSiteBrokerResult webSiteBrokerResult=webSiteBrokerClient.PublishPackage(PackageXml.OuterXml); //PackageXml.OuterXml);
So you'll notice that I am setting the MaxStringContentLength of the XmlReader used by the WS Binding.

At the server side, I have the following in the Web.config:
<
system.serviceModel>
<
bindings>
<
wsHttpBinding>
<
bindingname="WebSiteBrokerBinding"maxBufferPoolSize="2000000"
maxReceivedMessageSize="2000000000" >
<
securitymode="Transport" >
<
transportclientCredentialType="Windows" />
</
security>
<
readerQuotasmaxDepth="2000000"maxStringContentLength="2000000"
maxArrayLength="2000000"
maxBytesPerRead="2000000"
maxNameTableCharCount="2000000" />
</
binding>
</
wsHttpBinding>
</
bindings>
<
services>
<
servicename="xxxx.yyyy.Web.Server.WCF.WebSiteBroker"behaviorConfiguration="WebSiteBrokerBehaviour">
<!--
Service Endpoints -->
<
endpointaddress=""binding="wsHttpBinding"contract="xxxx.yyyy.Web.Server.WCF.IWebSiteBroker">
<!--

Upon deployment, the following identity element should be removed or replaced to reflect the
identity under which the deployed service runs. If removed, WCF will infer an appropriate identity
automatically.
-->
<
identity>
<
dnsvalue="localhost"/>
</
identity>
</
endpoint>
<
endpointaddress="mex"binding="mexHttpBinding"contract="IMetadataExchange"/>
</
service>
</
services>

I have upped the values to ridiculous values to try and sort this thing out!

The problem is every time I send a "package", I get the following exception:
The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://tempuri.org/ackageXml. 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 1, position 9614.'. Please see InnerException for more details.

Server stack trace:
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.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)
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 xxxx.yyyy.Web.Server.WCF.IWebSiteBroker.PublishPackage(String packageXml)
at xxxx.yyyy.Web.Server.WCF.WebSiteBrokerClient.PublishPackage(String packageXml) in C:\dev2008\xxxx.yyyy\xxxx.yyyy\Web\Server\WCF\WebSiteBrokerClient.cs:line 36
at xxxx.yyyy.Web.Publishing.PublishStockItemWebSitePackage.ExecutePackage() in C:\dev2008\xxxx.yyyy\xxxx.yyyy\Web\Publishing\PublishStockItemWebSitePackage.cs:line 75
at xxxx.yyyy.Win32.ApplicationContainer.UI.Editors.WebSitePublisher.PublishStockItems(DimpleDocument dimpleDocument) in C:\dev2008\yyyyDEAppContainer\yyyy2DEAppContainer\UI\Editors\WebSitePublisher.cs:line 316
So, it seems to be ignoring the pertinent line highlighted in bold regarding the XmlReader maximum size. As I am NOT setting it to 8192. It seems to be using the default value and ignoring my setting.

Can anyone help on this?



My System SpecsSystem Spec
Old 05-15-2008   #5 (permalink)
Newbie


Join Date: May 2008
This is supposed to be optional but validation doesn't think so.
 
Rep Power: 3
Program.X is on a distinguished road
  Program.X is offline

Re: The maximum message size quota for incoming messages exceeded

My System SpecsSystem Spec
 

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
NOW WHAT? "The maximum number of secrets that may be stored in a single system has been exceeded" aloha Vista security 6 3 Weeks Ago 03:45 PM
Quota exceeded - Cannot send mail EmmaHellen Vista mail 6 06-02-2008 10:22 PM
What is maximum size for folder now? Aigarslv Vista mail 2 12-26-2006 08:19 AM
Window Maximum Size =?Utf-8?B?Zmdyb3Nl?= Vista General 2 09-21-2006 09:33 AM


Update your Vista Drivers Update Your Vista Drivers Now!!

Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008