WebService.Application Property


The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets the application object for the current HTTP request.

Namespace:   System.Web.Services
Assembly:  System.Web.Services (in System.Web.Services.dll)

public HttpApplicationState Application {
		Level = AspNetHostingPermissionLevel.Minimal)]

XML Web services can use both application state and session state. Application state is maintained across all sessions accessing an XML Web service regardless of whether session state is turned off for a method(by using the EnableSession property of the WebMethodAttribute).

The example below demonstrates a hit counter, incrementing the count every time a browser calls the XML Web service method.

.NET Framework
Available since 1.1
Return to top