posts - 216, comments - 177, trackbacks - 68

My Links

News




I am a Microsoft Certified Application Developer MCAD Chartered Member (C# .Net) and born in Bangladesh.
I work for Ocean Informatics Pty Ltd as a Senior Developer - Analyst.
I am also co-founder and core developer of Pageflakes www.pageflakes.com
and most recently created SmartCodeGenerator

My Articles
Flexible and Plugin based .Net Application..
Mass Emailing Functionality with C#, .NET 2.0, and Microsoft® SQL Server 2005 Service Broker'
Write your own Code Generator or Template Engine in .NET
Smart Code Generator .NET: Usage Overview
Smart Code Generator .NET: Architectural Overview
Smart Code Generator .NET: using with NAnt and Cassini

Archives

Free Programming Language Training

ASP.NET Web Service Tips: Documentation

wsdlHelpGenerator makes it very easy to write our Own Help page for the ASP.NET Web service application. Sometimes you might not like the autogenerated Help page and want to add your own company logo and put your own descriptive help page. The following piece of tweak of your web.config will do the trick.

<configuration>
   <system.web>
      <webServices>
         <wsdlHelpGenerator href="docs/HelpPage.aspx"/>
      </webServices>
   </system.web>
</configuration>


 
If you want to use Attributes to give some description to your WebService and WebMethods,
You can do this:




    [WebService(Description = "Your Web service desctiption!!")]
    public class HelloWorldService : System.Web.Services.WebService
    {

        [WebMethod(Description="Your Method description!!") ]
        public string HelloWorld()
        {
            return "Hello World";
        }
    }

 
Again sometimes you might not want to expose any documentation at all, 
the following piece of tweak of your web.config again will do the trick.

<webServices>
<protocols>
<remove name="Documentation"/>
</protocols>
</webServices>

 

Print | posted on Wednesday, January 09, 2008 2:23 PM |


Feedback

# re: ASP.NET Web Service Tips: Documentation

gdbd 8/13/2008 12:08 AM | Imran

Post Comment

Title  
Name  
Email
Url
Comment   
Please add 8 and 2 and type the answer here:

Powered by: