From MSDN
The Create method returns a descendant of the WebRequest class
determined at run time as the closest registered match for requestUri.
For example, when a URI beginning with http:// or https:// is passed
in requestUri, an HttpWebRequest is returned by Create.
If a URI beginning with ftp:// is passed instead, the Create method will return
a FileWebRequest instance. If a URI beginning with file:// is passed
instead, the Create method will return a FileWebRequest instance.
The pre-registered reserve types already registered include the
following:
http://
https://
ftp://
file://
The .NET Framework includes support for the http://, https://, ftp://,
and file:// URI schemes. Custom WebRequest descendants to handle other
requests are registered with the RegisterPrefix method.
Full reference here
To resolve the error: "The underlying connection was closed: Could not establish trust
relationship for the SSL/TLS secure channel" write this code before the request and the certificate should validate.
ServicePointManager.ServerCertificateValidationCallback +=
delegate(
object sender,
X509Certificate certificate,
X509Chain chain,
SslPolicyErrors sslPolicyErrors)
{
return true;
};