none
increasing the timeout and maxReceivedMessageSize RRS feed

  • Question

  • I am trying to change my web.config of WCF application so as to increase the maxReceivedMessageSize, sendTimeout, receiveTimeout. But is doesn't applies. Please suggest what mistake have i encountered in the the below web.config file

    <?xml version="1.0"?>
    <configuration>

      <system.web>
        <compilation debug="true" targetFramework="4.0" />
      </system.web>

      <system.serviceModel>
        <bindings>
          <basicHttpBinding>
            <binding
              name="BindingConfig"
              maxBufferSize="2147483647"
              maxReceivedMessageSize="2147483647"
              sendTimeout="10:00:00"
              receiveTimeout="10:00:00"
              maxBufferPoolSize="2000000000">
              <security mode="None" />
            </binding>
          </basicHttpBinding>
        </bindings>

        <behaviors>
          <serviceBehaviors>
            <behavior>
              <!--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>

            <behavior name ="PFServiceConfigration">
              <!--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="true"/>
            </behavior>
          </serviceBehaviors>
        </behaviors>
        <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />

        <services>
          <service name="SilverlightApplication1.Web.PFService"
                   behaviorConfiguration="PFServiceConfigration">
            <endpoint address="http://localhost:60649/PFService.svc"
                      binding="basicHttpBinding"
                      bindingConfiguration="BindingConfig"
                      contract="WcfService.IPFService"
                      name="BasicHttpBinding_PFService" />
          </service>
        </services>
      </system.serviceModel>

      <system.webServer>
        <modules runAllManagedModulesForAllRequests="true"/>
      </system.webServer>

    </configuration>

    Tuesday, February 12, 2013 7:39 AM

Answers

  • Hi Srivastava,

    Can you please verify if the configuration for the services you are using is same on client as well as server where your service is hosted.It should be same for the whole process to work.Is there any exception you get for exceeding the aforementioned property ?

    Thanks,

    BR,

    JollyWagoner


    • Edited by JollyWagoner Tuesday, February 12, 2013 4:31 PM
    • Marked as answer by K Srivastava Wednesday, February 13, 2013 5:53 AM
    Tuesday, February 12, 2013 4:30 PM

All replies

  • Hi Srivastava,

    Can you please verify if the configuration for the services you are using is same on client as well as server where your service is hosted.It should be same for the whole process to work.Is there any exception you get for exceeding the aforementioned property ?

    Thanks,

    BR,

    JollyWagoner


    • Edited by JollyWagoner Tuesday, February 12, 2013 4:31 PM
    • Marked as answer by K Srivastava Wednesday, February 13, 2013 5:53 AM
    Tuesday, February 12, 2013 4:30 PM
  • Thanks for the reply. Yes my client and server web.config was a mismatch.

    Exactly that was the problem.

    Wednesday, February 13, 2013 5:54 AM