I have a simple .Net web service. When I visit the /webservice.svc path in a browser .Net renders a nice help page with some sample C# and VB.Net code. How do I stop this from displaying? Also, is there any way to prevent a request for ?wsdl from returning the wsdl file?
Thanks for any insight in advance.
Remove <serviceMetadata httpGetEnabled="true"/>
from web.config
<system.serviceModel>
...
<behaviors>
<serviceBehaviors>
<behavior name="mexBehavior">
<!-- Remove this
<serviceMetadata httpGetEnabled="true"/>
-->
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With