none
Metadata contains a reference that cannot be resolved: RRS feed

  • Question

  • Hi,

    I am trying access same method in different address(clientA,clientB)

             

     <endpoint name="ClientA"  address="/ClientA" binding="basicHttpBinding" contract="WCf_Metadata_BasicHttpBinding.IService1"></endpoint>

             

     <endpoint name="ClientB"  address="/ClientB" binding="basicHttpBinding" contract="WCf_Metadata_BasicHttpBinding.IService1"></endpoint>

    In cweb application trying to add service refernce "http://localhost:53355/Service1.svc/clientA".Its throwing error

    here was an error downloading 'http://localhost:53355/Service1.svc/test/_vti_bin/ListData.svc/$metadata'.
    The request failed with HTTP status 404: Not Found.
    Metadata contains a reference that cannot be resolved: 'http://localhost:53355/Service1.svc/test'.
    There was no endpoint listening at http://localhost:53355/Service1.svc/test that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
    The remote server returned an error: (404) Not Found.
    If the service is defined in the current solution, try building the solution and adding the service reference again.

    Please suggest




    • Edited by Shankarbs Thursday, December 4, 2014 2:56 PM
    Thursday, December 4, 2014 2:56 PM

Answers

All replies

  • //localhost:53355/Service1.svc/test

    What is "test"? And at most, it should be //localhost:53355/Service1.svc.

    Thursday, December 4, 2014 4:50 PM
  • OOps sorry i have pasted other error.

    http://localhost:53355/Service1.svc/client1/_vti_bin/ListData.svc/$metadata'.

    I am trying give access to two different clients of the same methods.

       <endpoint address="client1" binding="wsHttpBinding"
             contract="WCf_Metadata_BasicHttpBinding.IService1" />

       <endpoint address="client2" binding="wsHttpBinding"
             contract="WCf_Metadata_BasicHttpBinding.IService1" />

    in client web app using add service reference http://localhost:53355/Service1.svc/client1 this is giving above error


    priyanka

    Thursday, December 4, 2014 5:02 PM
  • For this situatuion, when adding service reference or navigate the service(.svc) in browser, the relative address defined in the service side can't be used. You can only use the http://localhost:53355/Service1.svc address to expose the service endpoint.

    After adding the service through the above address, you could notice that there are some Endpoints added within the client side web.config file, like below:

    <endpoint address="http://localhost:8010/Service1.svc/Test1"
            binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IService11"
            contract="Wcf_Rest.IService1" name="BasicHttpBinding_IService11" />
          <endpoint address="http://localhost:8010/Service1.svc/Test2"
            binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IService1"
            contract="Wcf_Rest.IService1" name="WSHttpBinding_IService1"

    For more information, you could refer to:

    http://www.codemag.com/Article/0701041

    http://msdn.microsoft.com/en-us/magazine/cc163412.aspx

    Regards

    Friday, December 5, 2014 6:31 AM
    Moderator