We are trying to query broker database relying on the SDL Web Content Interaction Library (CIL) and Content Broker Query API (C#). We keep getting the error - No connection could be made because the target machine actively refused it

The app.config file has the following content:

<add key="discovery-service-uri" value="http://example:8082/discovery.svc" />
<add key="oauth‐enabled" value="false" />

Session enabled content service runs on the port 8081. All ports are open in windows firewall, OAuth is disabled. Content service is registered as capability in discovery service (http://localhost:8081/content.svc). Services are on Azure Virtual Machine (inbound port rules are also set).

When changing the settings to:

<add key="content-service-uri" value="http://example:8081/content.svc" />
<add key="oauth‐enabled" value="false" />

Everything works fine. Would appreciate any hints why it would behave so and any suggestions how to enable connection through discovery service. Thanks.

1 Answer 1


I guess your CIS services run on a different machine than your web application.

In that case, it is important that your CIS capabilities are not registered with localhost URLs. The web app will contact the Discovery Service to retrieve the URL of the Content Service (and other CIS Services). If those are registered with localhost URLs, the web app will only be able to connect to them if it is running on the same machine.

  • 2
    To further add to the answer: go to discovery service directory -> config folder -> get the cd_storage_config -> open and look for the capabilities, make sure that the url for each capability has the host-name of the machine not localhost (if the machine is not localhost) -> update registration of capabilities. You can also do this for individual services if you auto-register on install.
    – ginibeagha
    Commented Jul 2, 2018 at 8:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.