locked
"Error loading URL" error while adding a WCF Service connection to the External ContentType

    Question

  • Hi,

    I have created a basic WCF service and published it on IIS.

    In SPD, if I create a new External Content Type and select the connection type as WCF service.

    I get the error:

    "Connection to the WCF service that has name ... cannot be established"

    "Error loading URL ...

    This normally happens when URL does not point to a valid discovery document, service description, or XSD schema"

    My settings were:

    Service Metadata URL

    http://.../WebClientWcfServices/UserProfileService.svc?wsdl

    Connection Mode:

    WSDL

    Service Endpoint URL: 

    http://.../WebClientWcfServices/UserProfileService.svc

    WCF service is developed in VS2010, no customization has been made, just plain dummy service.

    I can also connect to the WCF service from SP server. Both links are working fine.

    What else do I need to check ?

    Ayn help would be appreciated.

    Thanks 

    Wednesday, February 15, 2012 9:13 AM

Answers

  • Ok I found it.

    It was because the metadata was trying to reach the url using the hostname and the hostname could not be resolved in SP server.

    After addng the hostname to hosts file, I was able to connect to the service.

    • Marked as answer by Deniz Intepe Wednesday, February 15, 2012 9:22 AM
    Wednesday, February 15, 2012 9:22 AM