The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

How to: Use the WebService Attribute 

You can use the WebService attribute to specify the namespace, which defaults to "", and description text for the XML Web service. By default the ASP.NET Web Service project template does not generate a class that includes this attribute. Separate multiple properties with a comma.

To apply the WebService attribute

  • Insert the WebService attribute before the class declaration and set the Namespace and Description properties as shown below:

    <System.Web.Services.WebService( _ 
       Namespace:="http://servername/xmlwebservices/", _ 
       Description:="Some descriptive text could go here.")> _ 
    Public Class Service1
        Inherits System.Web.Services.WebService
        ' Implementation code.
    End Class

       Description="Some descriptive text could go here.")] 
    public class Service1 : System.Web.Services.WebService
        // Implementation code.

See Also

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2014 Microsoft