You must Sign In to post a response.
  • Category: WCF

    How not expose wsdl from WCF.

    HI Team,

    How do we not expose the wsdl file from WCF due to security reason.

    When we run the wcf url in browser then it should be blank screen.How do we enable these settings.

    Thanks,
    Navaneeth.
  • #769414
    The httpGetEnabled attribute of the serviceMetadata element in the configuration file, enables the publishing of WSDL metadata. If httpGetEnabled attribute is set to true, metadata is published, if httpGetEnabled attribute is set to false, metadata is not published.
    <serviceMetadata httpGetEnabled="true" />

    Miss. Jain
    Microsoft Certified Technology Specialist in .Net

  • #769788
    as explained in the above, httpGetEnabled property in serviceMetadata will get enable the WCF stuff.
    also, we can remove entire tag of serviceMetada . this also hide the WSDL and not expose the WCF stuff at outer side.

    Hope these 2 configurations will help you to hide the WSDL stuff

    Thanks!
    B.Ramana Reddy


  • Sign In to post your comments