Guy
Guy

Reputation: 67230

Larger WCF messages via MSMQ not processed

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?

Upvotes: 3

Views: 1000

Answers (1)

Guy
Guy

Reputation: 67230

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>

Upvotes: 2

Related Questions