I thought that deleting of endpoint with 'IMetadataExchange' is enough. I did that but wsdl file is still generated...
How to hide wsdl information on WCF?
P.S. Probably my question is not valid (I don't understand WCF too deep), so please correct me.
Solution 1: Write some code in your " web. config" file in the <system. web> section. This code will not generate the documentation of the web service and if you again run the web service then it will provide the exception.
You can use WCF to export WSDL documents from a ServiceDescription instance for your service. WSDL documents are automatically generated for your service when you publish metadata endpoints.
WSDL stands for Web Service Description Language. The WCF service exposes the WSDL document for the clients, to generate proxies and the configuration file. The WSDL file provides the following information for the consumers of the WCF service.
Your service's behavior configuration most probably contains:
<serviceMetadata httpGetEnabled="true" />
Remove serviceMetadata
behavior from your service configuration or turn its httpGetEnabled
to false
.
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