Windows apps
Collapse the table of content
Expand the table of content
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IWebRequestCreate.Create Method (Uri)


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

Creates a WebRequest instance.

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

WebRequest Create(
	Uri uri


Type: System.Uri

The uniform resource identifier (URI) of the Web resource.

Return Value

Type: System.Net.WebRequest

A WebRequest instance.

Exception Condition

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


uri is null.


In the .NET for Windows Store apps or the Portable Class Library, catch the base class exception, FormatException, instead.

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.

Universal Windows Platform
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top
© 2018 Microsoft