Maximum wcf message size

Hey guys, the WCF question for you here:

I have two services, and I send fairly short messages between them (~ 100 kb). Although the previously mentioned value is typical for the size of the message, it can fluctuate greatly (in both positive and negative directions).

Thus, in order to deal with such situations when I have to transfer a swollen message, I collapsed the entire maximum message size, maximum size, etc. attributes in app.config both on the client and on the server (with the corresponding endpoint correctly referring to the binding that determines the sizes)

The amount associated with you completely exceeds any possible message size for security. However, when the interservice communication turned out to be reliable at the bottom of the message size scale, this is not the case at the upper end - messages do not seem to be delivered at all.

The strangest thing is that if the message exceeded the maximum size, then an exception would be thrown (I met them enough to know that! Lol), but nothing throws - everything goes completely silently. I experimented with different message sizes, and this is definitely just starting to happen as the message size grows. I can prove that the destination service was not received, because when the service is received, the service writes to the database - but the log is not created with large messages.

as I said, I'm pretty sure I have increased the size of all applicable attributes in app.config, and therefore I am completely and completely puzzled by this behavior!

Any suggestions on what might cause such mystical behavior? any help would be much appreciated as this is the final obstacle in my project! thanks: -)

+3
max service message size wcf
source share
3 answers

Well, this problem seems to have solved (all of a sudden, after never complaining before, WCF started to get upset about some value in app.config, changed it, and it seemed to work then!)

however now i have the same weird problem! for some reason, he refuses to admit that I configured the metadata for publication. my app.config setup (host side) is as follows:

<services> <service name="DataFeederService.FeederService" behaviorConfiguration="DataFeederService.FeederServiceBehavior"> <host> <baseAddresses> <add baseAddress="http://localhost:8010/Feeder"/> <add baseAddress="net.pipe://localhost/FeederPipe"/> </baseAddresses> </host> <!-- Service Endpoints --> <!-- Unless fully qualified, address is relative to base address supplied above --> <endpoint name="namedPipeEndpoint" address="" bindingConfiguration="IPCWindowsSecurity" binding="netNamedPipeBinding" contract="DataFeederService.IFeederService"> <identity> <dns value="localhost" /> </identity> </endpoint> <endpoint name="httpEndpoint" address="FeederService" binding="wsHttpBinding" bindingConfiguration="httpBinding" contract="DataFeederService.IWebFeederService"/> <!-- Metadata Endpoints --> <!-- The Metadata Exchange endpoint is used by the service to describe itself to clients. --> <!-- This endpoint does not use a secure binding and should be secured or removed before deployment --> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/> </service> </services> <bindings> <netNamedPipeBinding> <binding name="IPCWindowsSecurity" maxBufferPoolSize="965536" maxBufferSize="965536" maxReceivedMessageSize="965536"> <readerQuotas maxStringContentLength="965536" /> <security mode="Transport"> <transport protectionLevel="EncryptAndSign" /> </security> </binding> </netNamedPipeBinding> <wsHttpBinding> <binding name="httpBinding" maxBufferPoolSize="965536" maxReceivedMessageSize="965536"> <readerQuotas maxStringContentLength="965536" /> </binding> </wsHttpBinding> </bindings> <behaviors> <serviceBehaviors> <behavior name="DataFeederService.FeederServiceBehavior"> <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment --> <serviceMetadata httpGetEnabled="True" policyVersion="Policy15"/> <!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information --> <serviceDebug includeExceptionDetailInFaults="True" httpHelpPageEnabled="true" /> </behavior> </serviceBehaviors> </behaviors> 

I tried my best to figure out why it would require metadata not to be published at the address: http: // localhost: 8010 / Feeder / mex . "Any help would be greatly appreciated.

Hooray!

+1
source share

Sorry guys, after further trawling I found the source of the error! one of the classes in the datacontract has been changed (the [DataContract] attribute has been removed, but strangely [DataMemeber] remained in the corresponding properties! very strange!)

Thank you for your help in any case, especially for reaching this point where I can finally wash the hands of this damned project :-)

+1
source share

There are problems with WCF that will make it fail silently (that is, an exception), which can be difficult to debug. It looks like it could be the way you see it.

In this case, including tracing parameters in the WCF can be extremely useful, as this should allow you to see if the message is really reaching the service and how the dispatcher is dealing with it.

0
source share

All Articles