locked
WCF Service Cannot obtain Metadata RRS feed

  • Question

  • The service runs fine on development platform but not on Dev Server.

    Dev Server is IIS 8.0

    I've noticed that there are not Handler Mappings for "*.svc".

    And yes I have added a metadata endpoint: <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />

    I get the following error when trying to Reference the service.

    Error: Cannot obtain Metadata from http://myservice.svc If this is a Windows (R) Communication Foundation service to which you have access, please check that you have enabled metadata publishing at the specified address.  For help enabling metadata publishing, please refer to the MSDN documentation at http://go.microsoft.com/fwlink/?LinkId=65455.WS-Metadata Exchange Error    URI: http://myservice.svc    Metadata contains a reference that cannot be resolved: 'http://myservice.svc'.    There was no endpoint listening at http://myservice.svc 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.HTTP GET Error    URI: http://myservice.svc    There was an error downloading 'http://myservice.svc'.    The request failed with HTTP status 404: Not Found.


    John McKelvey

    Thursday, February 27, 2014 12:24 AM

Answers

All replies

  • The service runs fine on development platform but not on Dev Server.

    Dev Server is IIS 8.0

    I've noticed that there are not Handler Mappings for "*.svc".

    And yes I have added a metadata endpoint: <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />

    I get the following error when trying to Reference the service.

    Error: Cannot obtain Metadata from http://myservice.svc If this is a Windows (R) Communication Foundation service to which you have access, please check that you have enabled metadata publishing at the specified address.  For help enabling metadata publishing, please refer to the MSDN documentation at http://go.microsoft.com/fwlink/?LinkId=65455.WS-Metadata Exchange Error    URI: http://myservice.svc    Metadata contains a reference that cannot be resolved: 'http://myservice.svc'.    There was no endpoint listening at http://myservice.svc 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.HTTP GET Error    URI: http://myservice.svc    There was an error downloading 'http://myservice.svc'.    The request failed with HTTP status 404: Not Found.


    John McKelvey

    Thursday, February 27, 2014 12:18 AM
  • Try adding a behavior to your service with "httpGetEnabled" = true.
    Thursday, February 27, 2014 4:20 AM
  • Thanks,

    The <Behaviors> section already has a "httpGetEnabled" = true.


    John McKelvey

    Thursday, February 27, 2014 4:58 AM
  • Hi,

    It will be better if you post a config file here.

    Then also please try to check this similar thread:
    http://stackoverflow.com/questions/5899204/why-doesnt-my-local-wcf-service-resolve-metadata-when-i-have-configured-it-for .

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Monday, March 3, 2014 8:10 AM
  • I rebuilt the server, provisioned, and deployed the service successfully.  It might have had something to do with permissions as indicated in the thread you referenced but there is no way for me to be sure.  Regardless, thanks for your reply.

    J-Mac


    John McKelvey

    Monday, March 3, 2014 5:13 PM
  • Your endpoint just confuses me, http://myservice.svc  ?

    Happy Coding.

    Regards,
    Jaliya Udagedara (MVP - Visual C#, MCPD, MCSD) | My Blog

    Monday, March 10, 2014 12:09 PM