none
IIS Service and EnterpriseLibrary maxReceivedMessageSize 655360 RRS feed

  • Question

  • Hi there, 

    So there is a service that contacts another service and is expected to pool data from it. 

    Unfortunately the remote service has been offline for over three weeks and after it's been restored the local service is not updating the database. 

    I discovered in the log, that there is an error there:

    The maximum message size quota for incoming messages (655360) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element.

    1. I edited the web.config  in the main directory of the service to change this value to a higher one

    2. The service has been restarted (still getting the same message in the log file)

    3. the IIS has been restarted from the command line iisreset /restart /noforce (still getting the same message in the log file)

    This drives me crazy, why would changing the web.config of a service NOT have any effect on it  please ???

    There is entlib.config in the MForms\MServices\Configs but it does not contain any reference to MaxReceivedMessageSize.

    Questions: 

    1. Is it possible that the logger actually logs the EntLib error from the remote service ?

    2. Is there any way of checking what file is the running service actually using for reading the value ?

    3. Is the value of 655360 a default value ? I thought it should be 65536 by default, this would indicate this value is NOT a default value and is being read from a configuration file somewhere

    4. In essence how to make sure that the value has been increased and why would changing it in the web.config be not sufficient ?




    God bless you all :)

    Wednesday, March 23, 2016 9:38 AM

Answers

  • 1. I edited the web.config  in the main directory of the service to change this value to a higher one

    2. The service has been restarted (still getting the same message in the log file)

    It will not work on the service-side config unless you use a Custom Binding, point to the Custom Binding and give the ReaderQuota values needed in the Custom Binding.

    So look up how to use Custom Bindings in WCF Service.

    Thursday, March 24, 2016 12:49 PM
  • Hello,

    >>1. Is it possible that the logger actually logs the EntLib error from the remote service ?
    >>2. Is there any way of checking what file is the running service actually using for reading the value ?

    For the WCF Service, it will read the service related configuration from the Web.config file.

    >>3. Is the value of 655360 a default value ? I thought it should be 65536 by default, this would indicate this value is NOT a default value and is being read from a configuration file somewhere

    Yes, the default value is 65,536 bytes. For more information, please try to refer to:

    >>4. In essence how to make sure that the value has been increased and why would changing it in the web.config be not sufficient ?

    In order to make the change to be sufficient, we need to do the same configuration in the both Service and Client side, so please make sure that you have increased those value like the MaxReceivedMessageSize in the Client side as well.

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey.




    Thursday, March 24, 2016 1:08 PM
    Moderator

All replies

  • 1. I edited the web.config  in the main directory of the service to change this value to a higher one

    2. The service has been restarted (still getting the same message in the log file)

    It will not work on the service-side config unless you use a Custom Binding, point to the Custom Binding and give the ReaderQuota values needed in the Custom Binding.

    So look up how to use Custom Bindings in WCF Service.

    Thursday, March 24, 2016 12:49 PM
  • Hello,

    >>1. Is it possible that the logger actually logs the EntLib error from the remote service ?
    >>2. Is there any way of checking what file is the running service actually using for reading the value ?

    For the WCF Service, it will read the service related configuration from the Web.config file.

    >>3. Is the value of 655360 a default value ? I thought it should be 65536 by default, this would indicate this value is NOT a default value and is being read from a configuration file somewhere

    Yes, the default value is 65,536 bytes. For more information, please try to refer to:

    >>4. In essence how to make sure that the value has been increased and why would changing it in the web.config be not sufficient ?

    In order to make the change to be sufficient, we need to do the same configuration in the both Service and Client side, so please make sure that you have increased those value like the MaxReceivedMessageSize in the Client side as well.

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey.




    Thursday, March 24, 2016 1:08 PM
    Moderator