Tip: Sending large Peer Channel messages and NetPeerTcpBinding.ReaderQuotas
Scenario: Trying to send large WCF messages over the Peer Channel
Symptom: Peers do not receive messages even though NetPeerTcpBinding.MaxReceivedMessageSize is appropriately configured.
Tip: Set the NetPeerTcpBinding.ReaderQuota field values to integer.MaxValue like so:
<netPeerTcpBinding>
<binding name="standard_LargeMsgConfig0" maxReceivedMessageSize="200000">
<readerQuotas
maxDepth="2147483647"
maxStringContentLength="2147483647"
maxArrayLength="2147483647"
maxBytesPerRead="2147483647"
maxNameTableCharCount="2147483647" />
<security mode="None" />
</binding>
</netPeerTcpBinding>
-Shalini.
Comments
Anonymous
October 03, 2006
Thank you for the tip. I have a question regarding Custom Resolver versus PNRP for Peerchannel. I use the following in my AppConfig for PeerChannel: <netPeerTcpBinding> <binding name="Binding1" maxReceivedMessageSize="65536"> <readerQuotas maxStringContentLength="65536" maxBytesPerRead="65536" /> <resolver mode= "Pnrp"> <custom address="net.tcp://LOCALHOST:75/GCT/peerResolverService" binding="netTcpBinding" bindingConfiguration="Binding2" resolverType="GCT.Resolver.CustomPeerResolver, GCT" /> </resolver> <security mode="None"> <transport credentialType="Password" /> </security> </binding> </netPeerTcpBinding> Changing < resolver mode= "Custom"> allows me to use Custom Peer Resolver or Pnrp. Is this the recommended approach? At times, I get a Peer Resolver error in my application when I use "Pnrp" - is this a known issue?Anonymous
October 17, 2006
Hi Madhu, (Some corrections to my earlier response, since I just noticed that you were explicitly specifying mode=PNRP - as opposed to mode=Auto- sorry for overlooking that :)).. What is the PnrpResolver exception that you see? If you specified resolver mode =PNRP, it should just switch to using it, without any exception (unless the exception says PNRP is not enabled or something like that). Again, I'd be able to help you out more if you could let me know what exception you were seeing.. Thanks, Shalini.