WebRequest.CreatorInstance WebRequest.CreatorInstance WebRequest.CreatorInstance WebRequest.CreatorInstance Property

Definition

Warning

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.

public:
 virtual property System::Net::IWebRequestCreate ^ CreatorInstance { System::Net::IWebRequestCreate ^ get(); };
[System.Obsolete("This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.", true)]
public virtual System.Net.IWebRequestCreate CreatorInstance { get; }
member this.CreatorInstance : System.Net.IWebRequestCreate
Public Overridable ReadOnly Property CreatorInstance As IWebRequestCreate

Property Value

Remarks

This property allows an application to determine which IWebRequestCreate derived factory object was used to create the request. This object may be System.Net.Browser.WebRequestCreator.BrowserHttp or System.Net.Browser.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 Microsoft Silverlight 3 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 System.Net.Browser.WebRequestCreator.ClientHttp handler while a SOAP web service might be able to use the default System.Net.Browser.WebRequestCreator.BrowserHttp handler.

Applies to