Strange error occurring when using wcf to run query against sql server

In your web.config, in your configuration\system.serviceModel\serviceHostingEnvironment element, add a minFreeMemoryPercentageToActivateService attribute, and set it to something lower than 5, I set mine to 0, and this error went away for me.

ex:

<configuration>
  <system.serviceModel>
    <serviceHostingEnvironment ... minFreeMemoryPercentageToActivateService="0" />
  </system.serviceModel>
</configuration>

Caution via MSDN: “Specifying this attribute along with partial trust in the web.config file of a WCF service will result in a SecurityException when the service is run.”

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)