【问题标题】:asp.net mvc recaptcha 1.6 The remote certificate is invalid according to the validation procedureasp.net mvc recaptcha 1.6 根据验证程序远程证书无效
【发布时间】:2015-08-25 15:58:23
【问题描述】:

无法使用 asp.net mvc recaptcha 1.6 托管网站。 如果您在 SLL 中部署网站,控件会生成错误: 根据验证程序,远程证书无效。 如何纠正这个错误

【问题讨论】:

    标签: asp.net-mvc https certificate recaptcha


    【解决方案1】:

    使用“Telerik Just Decompile”反编译项目 Recaptcha.Web.dll(它是免费的)

    并修改 RecaptchaVerificationHelper 类中的 2 行:

    VerifyRecaptchaResponse 方法中的代码必须是:

    uri = (this.UseSsl ? new Uri("https://www.google.com/recaptcha/api/verify", 
          UriKind.Absolute) : new Uri("http://api-verify.recaptcha.net/verify", 
          UriKind.Absolute));
    

    VerifyRecaptchaResponseTaskAsync 方法中的代码必须是:

    uri = (this.UseSsl ? new Uri("https://www.google.com/recaptcha/api/verify", 
          UriKind.Absolute) : new Uri("http://api-verify.recaptcha.net/verify", 
          UriKind.Absolute));
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-03-28
      • 2016-11-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-08-08
      相关资源
      最近更新 更多