This documentation is archived and is not being maintained.

Using Secure Sockets Layer

The WebRequest and WebResponse classes use Secure Sockets Layer (SSL) to communicate with hosts that support SSL automatically. The decision to use SSL is made by the WebRequest class, based on the URI it is given. If the URI begins with "https:", SSL is used; if the URI begins with "http:", SSL is not used.

The following example illustrates using SSL.

Dim MyURI As String = "https://www.contoso.com/"
Dim Wreq As WebRequest = WebRequest.Create(MyURI)
[C#]
String MyURI = "https://www.contoso.com/";
WebRequest WReq = WebRequest.Create(MyURI);

See Also

Internet Security | Accessing the Internet

Show: