【问题标题】:ReportViewer on Azure web role: The underlying connection was closedAzure Web 角色上的 ReportViewer:基础连接已关闭
【发布时间】:2012-06-19 11:38:22
【问题描述】:

我有一个配置了 SSL 的 Web 角色,它有一个 ReportViewer 控件,用于呈现托管在 Azure Reporting Services 中的报告。

当我使用 ReportViewer 加载页面时出现错误:

底层连接已关闭:无法建立信任 SSL/TLS 安全通道的关系。远程证书是 根据验证程序无效。

发生了什么事?

【问题讨论】:

    标签: azure reportviewer


    【解决方案1】:

    这成功了。我将此代码放在具有报表查看器的页面中的 _Load 事件中:

    ServicePointManager.ServerCertificateValidationCallback += new RemoteCertificateValidationCallback(BypassSslCertificateValidation);
    
    
    private static bool BypassSslCertificateValidation(object sender, X509Certificate cert, X509Chain chain, SslPolicyErrors error)
    {
       return true; //add your validation logic here
    }
    

    【讨论】:

      猜你喜欢
      • 2015-12-02
      • 1970-01-01
      • 1970-01-01
      • 2017-06-16
      • 1970-01-01
      • 2011-03-30
      • 2018-03-29
      • 2019-03-01
      • 2017-04-24
      相关资源
      最近更新 更多