Recently I wrote about an error message with WCF that testified not really anything about the error. At that time it went to the loading of data. So from the WCF host (server) on the client.
At the time I wrote: "what me here struck, the setting must be made only on the client side." "On the server side I could be so everything as before."
Now, I wanted to store the same object. So send from the client to the server. And it made booom. The error message was / is it also very meaningful. I only knew now in which direction I had to search.
The exception reported something in the form:
"System.ServiceModel.CommunicationException" was caught.
Message = "The socket connection was aborted." This can be caused by a crossing of Empfangstimeouts by the remote host or by a problem in the underlying network resource by an error while processing the message. "Local Sockettimeout: \" 00: 00: 59 9989999\ "."
SocketTimeout? Well, I thought I already could have it probably to do with the size of the object to be transferred. So, I have adjusted the app.config for the WCF host on the server side.
< netTcpBinding >
< binding name = "Core" maxReceivedMessageSize = "10485760" >
< security mode = "TransportWithMessageCredential" >
< message clientCredentialType = "Username" / >
< transport clientCredentialType = "None" / >
< / security >
< / binding >
< / netTcpBinding >The amendment is line 2. maxReceivedMessageSize was already in the last posting on the subject.
I got but still an error message that run all over again. It was but now so accurate I the problem also could fix it.
"… The InnerException message was \"Fehler when deserializing the object \"vom type library. Person\ "." The maximum length (16384) has been exceeded while reading XML data.
Here, you know, but immediately what to do.
< netTcpBinding >
< binding name = "Core" maxReceivedMessageSize = "10485760" >
< readerQuotas maxArrayLength = "10485760" / >
< security mode = "TransportWithMessageCredential" >
< message clientCredentialType = "Username" / >
< transport clientCredentialType = "None" / >
< / security >
< / binding >
< / netTcpBinding >Line 3 solved the problem. OK, the number is certainly too high. I wonder however so or so how so you can't just use WCF not like in different modes. Where the various limits much higher are a modes for Internet, with all its limitations and a modes for internal corporate applications.
I must also otherwise configure Yes Windows if I want to download a 100 MB file from your own LAN.
