Export (0) Print
Expand All

WebRequest.CreatorInstance Property

.NET Framework 4.5

Note: This API is now obsolete.

When overridden in a descendant class, gets the factory object derived from the IWebRequestCreate class used to create the WebRequest instantiated for making the request to the specified URI.

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

[ObsoleteAttribute("This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.", 
public virtual IWebRequestCreate CreatorInstance { get; }

Property Value

Type: System.Net.IWebRequestCreate
Returns IWebRequestCreate.
The derived WebRequest type returned by the Create method.

This property allows an application to determine which IWebRequestCreate derived factory object was used to create the request. This object may be P:System.Net.Browser.WebRequestCreator.BrowserHttp or WebRequestCreator.ClientHttp, but it may also be a custom instance derived from IWebRequestCreate. This allows an application to determine whether the browser hosting Silverlight, the Silverlight client, or some custom object handles HTTP requests and responses for the WebRequest instance. The RegisterPrefix method allows an application to configure which derived WebRequest type will be instantiated when making a request to a specific URI. WebRequest creators are typically registered to handle a specific protocol, such HTTP or HTTPS, but can be registered to handle a request to a specific server or path on a server. This is useful when more than one derived WebRequest type can process requests for the same protocol. The  and later runtime supports multiple HTTP handlers each having different capabilities. For example, a web service that uses Representational State Transfer (REST) might require the WebRequestCreator.ClientHttp handler while a SOAP web service might be able to use the default P:System.Net.Browser.WebRequestCreator.BrowserHttp handler.

.NET Framework

Obsolete (does not compile) in 4.5.2 and later

Supported in: Windows Phone 8.1

Supported in: Windows Phone Silverlight 8.1

Supported in: Windows Phone Silverlight 8

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

© 2014 Microsoft