Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Larger WCF messages via MSMQ not processed

Tags:

.net

wcf

msmq

I have a Windows Console App hosting a WCF service that reads from an MSMQ. When the message size gets to around 7k to 8k the service reads it (i.e. it disappears from the Q) but the appropriate function isn't called. No exceptions thrown. Anybody have any clues about what's happening or where to look to resolve this?

like image 739
Guy Avatar asked Nov 17 '25 21:11

Guy


1 Answers

I tracked down the problem. In the .config file of the hosting app/service add or change the maxStringContentLength attribute of the readerQuotas element which defaults to 8196.

<bindings>
  <netMsmqBinding>
    <binding name="netMsmq">
      <security mode="None" />
      <readerQuotas
        maxDepth="32"
        maxStringContentLength="8196"
        maxArrayLength="16384"
        maxBytesPerRead="4096"
        maxNameTableCharCount="16384"
        />
    </binding>
  </netMsmqBinding>
</bindings>
like image 105
Guy Avatar answered Nov 20 '25 16:11

Guy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!