Export (0) Print
Expand All

IWebRequestCreate.Create Method

Creates a WebRequest instance.

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

WebRequest Create(
	Uri uri
)

Parameters

uri
Type: System.Uri
The uniform resource identifier (URI) of the Web resource.

Return Value

Type: System.Net.WebRequest
A WebRequest instance.

ExceptionCondition
NotSupportedException

The request scheme specified in uri is not supported by this IWebRequestCreate instance.

ArgumentNullException

uri is null.

SecurityException

The caller does not have permission to connect to the requested URI or a URI that the request is redirected to.

UriFormatException

The URI specified in uri is not a valid URI.

The Create method must return an initialized instance of the WebRequest descendant that is capable of performing a standard request/response transaction for the protocol without needing any protocol-specific fields modified.

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

Show:
© 2014 Microsoft