In this article I will explain with an example, how to configure ASP.Net Web Services (ASMX) to disable service descriptions.
 
 
 

Issue

Whenever the ASP.Net Web Service (ASMX) is browsed, a complete documentation is being displayed on the web page.
It includes documentation on the names of method, their usage, their parameters and return type. On many occasions we might not want to share this information publicly over the internet.
Configuring ASP.Net Web Services (ASMX) to disable service descriptions
 
 

Solution

In order to get rid of this, you will need to do the following setting in the Web.Config file.
<system.web>
    <webServices>
        <protocols>
            <remove name="Documentation/> 
        </protocols>
    </webServices>
</system.web> 
 
Once you done with the following setting and try to browse the ASP.Net Web Service (ASMX) again, you will get the following error.
Configuring ASP.Net Web Services (ASMX) to disable service descriptions