HttpContext.IServiceProvider.GetService Method (Type)

 
System_CAPS_noteNote

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

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)

Private Function GetService (
	service As Type
) As Object
	Implements IServiceProvider.GetService

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: