Click here to Skip to main content
15,067,630 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

am facing little bit problem over here... due to buffer size i changed my web.config like this..

<?xml version="1.0"?>
    <compilation debug="true" targetFramework="4.0" />
      <service name="Service1" behaviorConfiguration="ServiceBehavior">
        <endpoint address="" binding="wsHttpBinding" name="wsHttpNBinding" bindingConfiguration="TransportSecurity" contract="IService1" ></endpoint>
        <endpoint address="mex" binding="mexHttpBinding"  name="mexHttpNBinding" contract="IMetadataExchange"></endpoint>
        <binding name="TransportSecurity" maxReceivedMessageSize="2147483647"  maxBufferPoolSize="2147483647" 
                  closeTimeout="02:00:00" openTimeout="02:00:00" receiveTimeout="02:00:00" sendTimeout="10:00:00">
          <readerQuotas maxDepth="2147483647"
          <security mode="None"  >
            <transport clientCredentialType="None" proxyCredentialType="None"   ></transport>
        <behavior name="ServiceBehavior">
          <serviceMetadata httpGetEnabled="true"/>
          <serviceDebug includeExceptionDetailInFaults="true"/>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
    <!--<modules runAllManagedModulesForAllRequests="true" />-->
    <directoryBrowse enabled="true" />

but while am consuming it.. again its coming to default size.. like this

<?xml version="1.0" encoding="utf-8"?>
                <binding name="wsHttpNBinding" closeTimeout="00:01:00" openTimeout="00:01:00"
                    receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false"
                    transactionFlow="false" hostNameComparisonMode="StrongWildcard"
                    maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
                    messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
                    <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                        maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                    <reliableSession ordered="true" inactivityTimeout="00:10:00"
                        enabled="false" />
                    <security mode="None">
                        <transport clientCredentialType="Windows" proxyCredentialType="None"
                            realm="" />
                        <message clientCredentialType="Windows" negotiateServiceCredential="true" />
            <endpoint address="http://localhost/sample/Service1.svc"
                binding="wsHttpBinding" bindingConfiguration="wsHttpNBinding"
                contract="IService1" name="wsHttpNBinding" />

soo am unable to use this service in my project..

error is

" 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. "
Updated 18-Nov-20 9:56am

change client quota from (65536) to (2147483647) as on server you will able to use
Lokesh Kondapalli 17-Jun-13 6:15am
i hosted my service in lapy-1 and am using this service in lapy-2... in lapy-2 using wcf test client.. i changed its working but when am using in my project.. am unable to change that setting.. how to change client quota ?
deepakkavi 17-Jun-13 7:18am
are you adding reference of your service (Service Reference) to your application? if yes
then you could found, there is some setting in you app config or web config file
change the quota size there it will work
just i changed my project(where am consuming my wcf service) web.confige file means

in System 1- my service hosted
in System 2- my project consuming that wcf service.. in my project web.config file i changed.. make sure... ur size's same in service web.config as well as project web.config and thq u to al

just for refer[^]
Member 10281217 29-May-15 9:17am
I tried to increase the value for maxReceivedMessageSize, but then also getting the exception:

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

Can anybody please help here.
Lokesh Kondapalli 30-Dec-15 12:22pm
Are you testing in WCFTestClient ? or in other application by adding service reference ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900