WebService.Application Property

 

Gets the application object for the current HTTP request.

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

[BrowsableAttribute(false)]
public HttpApplicationState Application {
	[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, 
		Level = AspNetHostingPermissionLevel.Minimal)]
	get;
}

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
Show: