Search code examples
wcfwcf-security

How to disallow WCF metadata / wsdl


Is there a way to block the WSDL information on a WCF service. Looking for ways to improve security, blocking access to the WSDL seems like a great way to start.

Any other recommendations also welcome :)


Solution

  • You can use this Configuration to disable WCF metadata:

    <serviceBehaviors>
    <behavior name="Service1Behavior">
     <serviceMetadata httpGetEnabled="false"/>
    </behavior>
    </serviceBehaviors>