maxReceivedMessageSize reached RRS feed

  • Question

  • Hello,

    I tried to send bigger files from the server to me.I tried a version with


    and also without it. Nothing worked.

    Web.config - Configuration:
    <?xml version="1.0"?>

        <add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
        <compilation debug="true" strict="false" explicit="true" targetFramework="4.7.2" />
        <httpRuntime targetFramework="4.7.2"/>
            <!-- mychange -->
                <binding name="BasicHttpBindingSettings" maxReceivedMessageSize="2147483647"/><!-- add name="BasicHttpBindingSettings" is the 2nd trial -->
            <!-- end of mychange -->
                <service name="GettingStartedLib.CalculatorService">
                            <add baseAddress = "http://localhost:8000/GettingStarted/CalculatorService/" />
                    <endpoint address="" binding="wsHttpBinding" name="BasicHttpBindingSettings" contract="GettingStartedLib.ICalculator"><!-- add name="BasicHttpBindingSettings" is the 2nd trial -->
                            <dns value="localhost"/>

              <!-- To avoid disclosing metadata information, set the values below to false before deployment -->
              <serviceMetadata httpGetEnabled="true" httpsGetEnabled="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"/>
            <add binding="basicHttpsBinding" scheme="https" />
        <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
        <modules runAllManagedModulesForAllRequests="true"/>
            To browse web app root directory during debugging, set the value below to true.
            Set to false before deployment to avoid disclosing web app folder information.
        <directoryBrowse enabled="true"/>


    I then updated the server and afterwards also the client, but the client didn't received the change in  the configuration91.svinfo file:

            <property path="/maxReceivedMessageSize" isComplexType="false" isExplicitlyDefined="true" clrType="System.Int64, mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089">
              <serializedValue />

    Thursday, August 8, 2019 10:14 AM

All replies

  • Hi,
    Your thought is correctly, at first we definite the binding configuration which has set up the MaxReceivedMessageSize attribute, and then apply the binding configuration on the service endpoint. There is a small problem during applying the configuration.  Ordinarily, we apply the binding configuration by using BindingConfiguration attribute instead of the Name attribute. Please refer to the below code segments.

            <binding name="mybindingconfiguration" maxReceivedMessageSize="2147483647"></binding>
          <service name="WcfService1.Service1">
            <endpoint address="" binding="wsHttpBinding" contract="WcfService1.IService1" bindingConfiguration="mybindingconfiguration"></endpoint>

    Feel free to let me know if the problem still exists.
    Best Regards

    Friday, August 9, 2019 2:24 AM