none
WCF REST with custom binding freezes after a while RRS feed

  • Question

  • Hi

    I have a problem with a WCF webservice run on .Net 4.0, IIS7 with the integrated Pool. This is a REST webservice defined with a custom binding. 

    A Part of the configuraion from Web.config:

      <system.serviceModel>
        <behaviors>
          <serviceBehaviors>
            <behavior>
              <serviceMetadata httpGetEnabled="true" />
              <serviceDebug includeExceptionDetailInFaults="false" />
            </behavior>
            <behavior name="restbeh">
              <serviceDebug httpHelpPageEnabled="true" includeExceptionDetailInFaults="true" />
              <serviceMetadata httpGetEnabled="true" />
            </behavior>
          </serviceBehaviors>
          <endpointBehaviors>
            <behavior name="restendbeh">
              <webHttp helpEnabled="true" faultExceptionEnabled="true" defaultBodyStyle="Bare" />
            </behavior>
          </endpointBehaviors>
        </behaviors>
        <bindings>
          <customBinding>
                <binding name="myrestbinding">
                   <webMessageEncoding webContentTypeMapperType="XXX.JsonContentTypeMapper, XXX" />
                  <httpsTransport authenticationScheme="Anonymous"  requireClientCertificate="false" manualAddressing="true" maxReceivedMessageSize="524288000" />
    	    </binding>
            </customBinding>
        </bindings>
        <services>
          <service name="XXX.Service1" behaviorConfiguration="restbeh">
            <endpoint address="XXX"  contract="XXX.IService1" binding="customBinding" bindingConfiguration="myrestbinding" behaviorConfiguration="restendbeh"></endpoint>
          </service>
        </services>
        <serviceHostingEnvironment  aspNetCompatibilityEnabled ="true"/>
      </system.serviceModel>

    All parameters of the pool are default. 

    Problem: The Web service has about 2 requests per seconds. For about 15 minutes from the start/restart of the Pool web service runs correct. After that time web service instead of http status 200 returns the http status 202. Next after 1 to 2 hours web service works again without that problem for a while. This behaviour repeats all the time. 

    Question: What can I change in the configuration of my webservice to eliminate that problem?

    Thank you in advance for a response








    Wednesday, March 18, 2015 8:23 AM

Answers

  • Hi,

    For this scenario, you should refer to the following information:

    Accepted 202 means that the request has been accepted for processing, but the processing has not been completed. The request may or may not eventually be acted upon, as it may be disallowed when processing actually takes place. there is no facility for status returns from asynchronous operations such as this.

    2xx is all about success. 
    Whatever the client tried to do was successful up to the point that the response was send. Keep in mind that a status like 202 Accepted doesn’t say anything about the actual result, it only indicates that a request was accepted and is being processed asynchronously.

    For more information, you could refer to:

    https://www.develop.com/httpstatuscodesrest

    Regards

    Thursday, March 19, 2015 5:49 AM
    Moderator