500 System.ServiceModel.ServiceActivationException when making an Ajax call to WCF rest service

500 System.ServiceModel.ServiceActivationException when making an Ajax call to WCF rest service

I encountered this error for the rationale talked about under

Memory gates checking failed as a result of the free reminiscence (258187264 bytes) is lower than 5% of whole reminiscence. As a end result, the service is not going to be obtainable for incoming requests. To resolve this, both cut back the load on the machine or modify the worth of minFreeMemoryProportionToActivateService on the serviceHostingEnvironment config factor.

Many thanks to your impressed replies and feedback.

I really encountered the identical error however with totally different story:

At first, I obtained 404 (Not Found) server error, which is as a result of I didn’t have a transport for HTTPS in addition to I have already got one for the HTTP.

I added a <httpsTransport> to my <binding> factor, so it appeared like this:

<bindings>
  <customBinding>
    <binding identify=CustomBinding_ITheService>
      <httpTransport keepAliveEnabled=True transferMode=Streamed authenticationScheme=None maxBufferSize=2147483647 maxReceivedMessageSize=2147483647 guideAddressing=true />
      <httpsTransport keepAliveEnabled=True transferMode=Streamed authenticationScheme=None maxBufferSize=2147483647 maxReceivedMessageSize=2147483647 guideAddressing=true />
    </binding>
  </customBinding>
</bindings>

Then I obtained the 500 System.ServiceModel.ServiceActivationException error. However, I navigated Event Viewer > Windows Log > Application and located that transports can’t be outlined greater than a time for a similar binding. So, I made a decision to add an further endpoint with a brand new binding for the HTTPS transport.

At the tip, my configuration seems to be like the next:

<providers>
  <service identify=TheService behaviorConfiguration=WebHttpBehavior_ITheService>
    <endpoint binding=customBinding bindingConfiguration=CustomBinding_ITheService contract=ITheService behaviorConfiguration=EndPointBehavior_ITheService />
    <endpoint binding=customBinding bindingConfiguration=CustomBinding_ITheService_Secured contract=ITheService behaviorConfiguration=EndPointBehavior_ITheService />
  </service>
</providers>

<bindings>
  <customBinding>
    <binding identify=CustomBinding_ITheService>
      <httpTransport keepAliveEnabled=True transferMode=Streamed authenticationScheme=None maxBufferSize=2147483647 maxReceivedMessageSize=2147483647 guideAddressing=true />
    </binding>
    <binding identify=CustomBinding_ITheService_Secured>
      <httpsTransport keepAliveEnabled=True transferMode=Streamed authenticationScheme=None maxBufferSize=2147483647 maxReceivedMessageSize=2147483647 guideAddressing=true />
    </binding>
  </customBinding>
</bindings>

Then each issues goes the correct approach and works completely.

READ :  Formatting numbers (decimal places, thousands separators, etc) with CSS

In case you develop on visible Studio and use IIS-Express Cassini, bear in mind to allow SSL choice within the properties of the website-project, that tells IIS-Express to put together a base URL for the HTTPS transport that you just beforehand added to binding.

500 System.ServiceModel.ServiceActivationException when making an Ajax call to WCF rest service

Add site bindingGo to the IIS => then Default Website=> proper Click on that => Edit Bindings=> click on on ADD Button=> add HTTPS bindings there

Details ARE in proven screenshot

Related posts on Service Model :

Leave a Reply

Your email address will not be published. Required fields are marked *