System.Web.Services (system.web.services.dll)class

When creating a web service, you can inherit from this class to gain access to the built-in ASP.NET objects Application (the current System.Web.HttpApplicationState collection), Server, Session, User, and Context (which provides access to the built-in Request and Response objects). If you don't need to access these objects (or if you choose to go through the Context property) you don't need to derive your web service from this class.

When creating a web service class, all web methods must be marked with the WebMethodAttribute. To configure additional activities, you should also add the WebServiceAttribute to the class declaration.

public class WebService : System.ComponentModel.MarshalByValueComponent {
// Public Constructors
   public WebService( );
// Public Instance Properties
   public HttpApplicationState Application{get; }
   public HttpContext Context{get; }
   public HttpServerUtility Server{get; }
   public HttpSessionState Session{get; }
   public IPrincipal User{get; }


System.Object System.ComponentModel.MarshalByValueComponent(System.ComponentModel.IComponent, System.IDisposable, System.IServiceProvider) WebService

    Part I: Introduction to ASP.NET
    Part III: Namespace Reference
    Chapter 40. The System.Web.UI.MobileControls Namespace
    Chapter 42. The System.Web.UI.WebControls Namespace