Standalone WCF service will not accept post requests bigger than certain size (in case of https endpoint)

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:

  1. Other methods, on the same      instance of the service, which are executed before this method, all run      without any issues.
  2. 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.
    1. 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.
  3. 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.
  4. 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.

Answer
Answer

Hi Dejan,

Issues related to WCF Service is supported in MSDN forums. I would suggest you to post the query in MSDN forums.
http://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=wcf

Hope this information helps.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated February 12, 2018 Views 98 Applies to: