How to: Inherit from the WebService Class
By default, XML Web services created by using the ASP.NET Web Service project template inherit from theclass. Inheriting this class makes it possible for the XML Web service to access the ASP.NET intrinsic objects, such as Application and Session. For more information, see or .
If your class does not inherit from the WebService class, the Component Designer for the XML Web service will not be available.
If the XML Web service does not inherit from this class, it can access the ASP.NET intrinsic objects from theproperty. This can be the case when your XML Web service needs to inherit from a custom base class. The class implementing the XML Web service must be public and must have a public default constructor (a constructor without parameters). This makes it possible for ASP.NET to create an instance of the XML Web service class to process incoming XML Web service requests.
To inherit from the System.Web.Services.WebService class
You can inherit from the System.Web.Services.WebService class as shown in the example below:
Public Class Service1 Inherits System.Web.Services.WebService <System.Web.Services.WebMethod( _ Description:="Get SessionID", _ EnableSession:=True)> _ Public Function GetSessionID() As String GetSessionID = Me.Session.SessionID End Function End Class