有个内部系统,是通过ssl vpn拨通后才可以访问的,现在的问题就是用httpwebrequest访问该站点一直提示无法连接到远程服务器,用webbrowser控件试了也不行,但通过浏览器是可以访问的,请问有什么解决办法么?
网上查了一些东西,比如下面这个
using System.Text.RegularExpressions;
using System.Security.Authentication;
using System.Security.Cryptography.X509Certificates;
  public bool CheckValidationResult(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors errors)
        {    return true;        }然后下面这个就出错了,要求对象引用什么的
ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(CheckValidationResult);