WCF - Do I need to configure the binding both on the client and on the server (possibly the basics), but get confused. Can you clarify)?

I use NetNamedPipeBding to communicate with the service on the local machine. I understand that I need to define configuration options for the client, such as maxstringcontentlength, sendtimeout, maxbyteperread, etc. Do I need to define server side selections? What is the connection between the two? If the client does not have configuration settings when connected to it, will the default binding settings be used? Are they completely independent?

Please let me know if you have any questions, if my question itself is confused.

------------------------------------------------- For ex: I defined the below settings for client <netNamedPipeBinding> <binding name="NetNamedPipeBinding_IService" closeTimeout="00:01:00" openTimeout="00:03:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxConnections="10" maxReceivedMessageSize="2147483647"> <readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" /> <security mode="None"> <!--<transport protectionLevel="EncryptAndSign" />--> </security> </binding> </netNamedPipeBinding> And I also defined at server side similar settings: <services> <service behaviorConfiguration="ServiceBehavior" name="Namespace.Service" /> </services> <bindings> <netNamedPipeBinding> <binding name="NetNamedPipeBinding_Service" closeTimeout="00:01:00" openTimeout="00:03:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxConnections="10" maxReceivedMessageSize="2147483647"> <readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" /> <security mode="None"> <!--<transport protectionLevel="EncryptAndSign" />--> </security> </binding> </netNamedPipeBinding> </bindings> 
+4
source share
1 answer

Some settings are relevant at both ends, and some are only on the server, and some are on the client. Usually, most settings should have the same value, and yes, you need to configure the binding from both ends. You cannot use the settings of others after establishing a connection.

+1
source

All Articles