C# Visual Studio 2015: IWebProxy certificate validation : <p>I'm trying to create a C# proxy DLL that allow VS2015 Community, on my offline workstation, access to internet through a corporate HTTP proxy with authentication.</p>

<p>Following instruction of <a href="https://blogs.msdn.microsoft.com/rido/2010/05/06/how-to-connect-to-tfs-through-authenticated-web-proxy/" rel="noreferrer">this MSDN blog post</a>  I'm able to connect VisualStudio to HTTP pages in this way:</p>

<pre><code>namespace VSProxy
{
    public class AuthProxyModule : IWebProxy
    {   
        ICredentials crendential = new NetworkCredential("user", "password");

        public ICredentials Credentials
        {
            get
            {
                return crendential;
            }
            set
            {
                crendential = value;
            }
        }

        public Uri GetProxy(Uri destination)
        {
            ServicePointManager.ServerCertificateValidationCallback = (Header, Cer, Claim, SslPolicyErrors) =&gt; true;
            return new Uri("http://128.16.0.123:1234", UriKind.Absolute);
        }

        public bool IsBypassed(Uri host)
        {
            return host.IsLoopback;
        }
    }
}
</code></pre>

<p>But I'm not able to connect to the account authentication page for Visual Studio Community access.</p>

<p>So, I'm trying to validate Microsoft certificate using DLL.</p>

<p>There is any way can I accomplish HTTPS and certificate issue?</p>

<p>How can I validate the certificate in the webProxy DLL?</p>
