In this article I will explain with an example, how to hide method description and documentation of ASP.Net (ASMX) Web Services when browsed.
 
 

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.
Hide Method Description and Documentation of ASP.Net (ASMX) Web Services when browsed
 
 

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.
Hide Method Description and Documentation of ASP.Net (ASMX) Web Services when browsed