HttpContext.IServiceProvider.GetService Method (Type)

 

This API supports the product infrastructure and is not intended to be used directly from your code.

Returns an object for the current service type.

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

object IServiceProvider.GetService(
	Type service
)

Parameters

service
Type: System.Type

A type of HttpContext service to set the service provider to.

Return Value

Type: System.Object

A HttpContext; otherwise, null if no service is found.

This method is useful to gain access to the underlying HttpWorkerRequest object.

.NET Framework
Available since 1.1
Return to top
Show: