Hello there,
Interesting problem with (standalone, exe) WCF service. So I've built WCF rest service which exposes number of methods, some with GET, some with POST verb. Everything works splendid while using over http. However, when configured same service (same code base, only different configuration) to run under https, one of the methods (definition given bellow) will cause service to stop processing requests. Definition of this method is:
[OperationContract]
[WebInvoke(Method = "POST", UriTemplate = "uritemp", BodyStyle = WebMessageBodyStyle.WrappedRequest)]
XElement ServMethod(Stream argInput);
Why is this strange? Few facts I've established about this problem:
- Other methods, on the same instance of the service, which are executed before this method, all run without any issues.
- Issue is sensitive on the size of posted stream. According to Wireshark trace, if http request (as top layer) is smaller than 11547
bytes, method invokes normally. However, if it is bigger than this, it method fails. Definitely there is some size limit which renders this method unusable.
- To be even more precise, I've tried to increase parameters related to the size of the message, message buffer and so on. No luck with it.
- To be even more precise, method is not invoked (request not serialized). ServMethod never executes. So issue is somewhere on SSL or TCP/IP level. I can clearly see that wcf service will send [RST] packet to the client, which terminates request as far as client is concerned.
- If I try to trace my wcf service (as in configure tracing so I can look at it in the Service Trace Viewer), all I can notice is some very cryptic error description:
System.ServiceModel.CommunicationException, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
The I/O operation has been aborted because of either a thread exit or an application request
In all, it seems that communication between client and service is dropped by service on tcp level. Why is that, how is it related to the size of the message (perhaps related to http.sys), that is the big question.
Size of the message send by the client is not that extreme, let's say upper limit is around 200 kb.
Any help is very appreciated.