Freigeben über


The server did not provide a meaningful reply; this might be caused by a contract mismatch, a premature session shutdown or an internal server error

I am playing around with WCF, and I got that error message above. Searching did not really help in defining what was going on. And yes, it was working on my previous test environment. :)

Luckily, I still had one of my test method, which just ping the service and did nothing else. That method works, so at least I know that the problem was not with the service, only with this operation.

The problematic parameter took a parameter, an array of byte. Out of curiosity, I sent an empty array, lo behold, it worked.

It turned out that my test data was too big, I used a file to create that array of byte, and it worked great. I lost that small file and randomly picked a file. I did not realize the file was 6 GB in size. After replacing that file with a smaller one, it worked.

So, if you see that error above and you are passing an array of byte as parameter, probably this will help you to quickly fixed the issue.

Disclaimer, I do not think this is the only cause for that error.