How to show the invoke button in a web service using C# and ASP.NET

When deploying a webservice on IIS or otherwise, you may need to show an INVOKE button for testing or debugging the deployed webservice.

An invoke button looks like the one shown below…

For enabling this, just add HttpPost and HttpGet protocol under the webServices section of your web.config.

Excerpts from the web.config :

<system.web>
<webServices>
     <protocols>
       <add name="HttpGet"/>
       <add name="HttpPost"/>
     </protocols>
</webServices>

...

</system.web>

Why to enable ?

This by default is disabled to increase the security in the live enviroment, but can be enabled by adding these two protocols for testing or debugging the deployed web services.