Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Indigo

Vista - The maximum message size quota for incoming messages exceeded

 
 
Old 10-10-2007   #1 (permalink)
Abbas


 
 

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


 
 

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


 
 

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)


This is supposed to be optional but validation doesn't think so.
 
 

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)


This is supposed to be optional but validation doesn't think so.
 
 

Re: The maximum message size quota for incoming messages exceeded

My System SpecsSystem Spec
 

Thread Tools


Similar Threads
Thread Forum
HD Maximum size ? Vista hardware & devices
maximum Message store size Live Mail
NOW WHAT? "The maximum number of secrets that may be stored in a single system has been exceeded" Vista security
Quota exceeded - Cannot send mail Vista mail


Vista Forums 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 Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46