Export (0) Print
Expand All

How to: Disable the Service Help Page for a Web Service 

Navigating in a Web browser to the URL for the Web service without any parameters produces an HTML help page, if the page is enabled (which it is by default in a server's machine.config file). The service help page and its configuration are further discussed in Configuration Options for XML Web Services Created Using ASP.NET.

To disable the service help page for an individual Web application

  1. Open the Web.config file in the root directory of the Web application with your favorite editor. (If a Web.config file does not exist, create one.)

  2. Modify the webServices section of Web.config to explicitly remove the Documentation protocol.

           <remove name="Documentation" />
  3. Save Web.config.

    This configuration change will take effect on the next request to a Web service hosted by the Web application.


    Removing the Documentation protocol also disables WSDL file generation for any Web services within the Web application. This prevents clients from generating a proxy class unless a custom WSDL file is created and provided for them. To leave WSDL file generation on for Web services within a Web application, but not provide any human readable information regarding the Web services, you can add an <wsdlHelpGenerator> element to the Web.config file for the Web application and set the href attribute to a blank HTML page you have created. The following code example is an excerpt of a Web.config file that sets the service help page to a MyBlank.htm file in the docs folder beneath the folder containing the Web.config file.

       <wsdlHelpGenerator href="docs/MyBlank.htm"/>

See Also

Community Additions

© 2014 Microsoft