Check Http & Https Url Exists in c sharp
<p>I am Currently Working on a project which i am facing a problem to check the HTTPS URL is correct or not. Now i have done validation for HTTP in c# now i want validation for HTTPS</p>

<p>My code for HTTP Validation.</p>

<pre><code>HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.Proxy = WebProxy.GetDefaultProxy();
request.Proxy.Credentials = CredentialCache.DefaultCredentials;

// execute the request
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Response.Clear();
Response.Write(response.StatusDescription);
Response.End();
</code></pre>

<p>Anil</p>
