WCF error RRS feed

  • Question

  • HI friends,

    When i try to run WCF, i have a poblem,its showing

    Failed to add a service. Service metadata may not be accessible. Make sure your service is running and exposing metadata.

     Cannot obtain Metadata from http://localhost:57669/Service.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://localhost:57669/Service.svc    Metadata contains a reference that cannot be resolved: 'http://localhost:57669/Service.svc'.    The server did not provide a meaningful reply; this might be caused by a contract mismatch, a premature session shutdown or an internal server error.HTTP GET Error    URI: http://localhost:57669/Service.svc    The document at the url http://localhost:57669/Service.svc was not recognized as a known document type.The error message from each known type may help you fix the problem:- Report from 'XML Schema' is 'Root element is missing.'.- Report from 'DISCO Document' is 'Root element is missing.'.- Report from 'WSDL Document' is 'There is an error in XML document (0, 0).'.  - Root element is missing.


    Pls tell what the error and how to clear it?

    Friday, July 29, 2011 7:38 AM


  • Annop,

    Have you enabled metadata publishing in the config?. If not use the below code to do that.


    ·         <!--Enable Meta Data Publishing-->

    <endpoint address="mex"






    • Marked as answer by Yi-Lun Luo Thursday, August 4, 2011 9:43 AM
    Friday, July 29, 2011 8:13 AM