Is it possible to have a personalized Web Service Help page?

This is a question that I've received today from a customer and the answer is YES.

If you have a .NET Web Service http://www.mydomain.com/myservice.asmx and you type this url on your browser, a default page (provided by the .NET Framework) is displayed to you: here you can see all the methods provided by your Web Service. But how you can obtain a personalized page to the Web Service URL?

The answer is simple and comes from one of the many .NET methods that are not so famous: the wsdlHelpGenerator element.

This element (placed on the Web.config file) permits you to specify the XML Web service Help page (an .aspx file) that is displayed to a browser when the browser navigates directly to a .asmx XML Web services page.

You can create your personalized page (for example with a logo, personalized text etc.), open your Web.config file and place this section:

<configuration>
   <system.web>
      <webServices>
         <wsdlHelpGenerator href="mypage/MyServiceHelpPage.aspx"/>
      </webServices>
   </system.web>
</configuration>

That's all... now if you open the Web Service's URL with your browser, you'll obtain your new page. More simple than what you think...

P.S. Remember that the value of href is a file path, not a URL.

Print | posted on Wednesday, March 22, 2006 4:15 PM

Comments on this post

# Is it possible to have a personalized Web Service Help page?

Requesting Gravatar...
VIA STEFANO DEMILIANI WeBlog
This is a question that I've received today from a customer and the answer...
Left by Romeo Pruno on Mar 22, 2006 10:39 AM

Your comment:

 (will show your gravatar)
 
Please add 6 and 4 and type the answer here: