The remote certificate is invalid according to the validation procedure   根据验证过程中远程证书无效

I'm calling an ASP.NET web service from an ASP.NET web application. The two applications are on different servers. The web service requires SSL and presents the application with a self-signed certificate. Since this is an internal app, I want the client application to trust the web service and its self-signed cert. 我调用一个 ASP.net Web服务从一个ASP.NET Web应用, 这两个应用在不通的服务器上, Web Service请求了一个自签名的证书, 这事个内网app,我希望客户端应用信任web service的自签名证书。 
There are lots of suggestions on how to do this in your code by coding a delegate method to accept all server certificates regardless of origin:

这里是关于解决这个问题最多的方法, 就是 在你代码里通过委托方法的方式默认接受所有服务器证书。 
ServicePointManager.ServerCertificateValidationCallback =
delegate(object sender, X509Certificate certificate, X509Chain chain,
SslPolicyErrors sslPolicyErrors) { return true; };

I don't want to do this, though, because this same code will be rolled out to production and it seems sloppy to me to allow all certificates to validate carte blanche.
我不想这么做, 因为这样的代码放到生产环境允许所有证书验证通过太过敷衍和马虎并且不负责任。 

So, I set out to download the internal SSL certificate and install it in the client computer's Trusted Root Certification Authorities cache. That still doesn't work!
所以, 我下载了内网证书并且在客户端计算机安装到了信任的整数缓存, 但是依然不正常。 
Thanks to Ferry Onderwater's entry at http://www.arcencus.nl/Blogs/tabid/105/EntryID/39/Default.aspx, I see now where I went astray. By default, the Certificate snap-in installs certificates for the current user only. I needed all users to trust the certificate.
感谢 Ferry Onderwater's  的  http://www.arcencus.nl/Blogs/tabid/105/EntryID/39/Default.aspx 这片文章, 看起来是我现在想要的, 因为默认情况下,整数是安装在当前用户的, 我需要让所有用户都信任这个证书。 
解决方案:

  • 启动一个MMC.
  • File --> Add/Remove Snap-In...  文件-->添加删除  单元
  • Click Add...   点击添加
  • Choose Certificates and click Add.  选择证书并添加
  • Check the "Computer Account" radio button. Click Next.  选择计算机 账号  按钮 点击下一步
  • Choose the client computer in the next screen. Click Finish.  选择客户端计算机在下一个屏幕, 点击完成
  • Click Close. 点击关闭
  • Click OK.  点击确定
  • NOW install the certificate into the Trusted Root Certification Authorities certificate store. This will allow all users to trust the certificate.  现在 安装证书到信任的根证书授权证书存储 (不同的系统中文翻译不太一样, 大概意思明白就行。 ) 然后允许所有证书信任此证书。
  •   

The remote certificate is invalid according to the validation procedure 远程证书验证无效的更多相关文章

  1. 解决“The remote certificate is invalid according to the validation procedure”问题

    在用HttpClient发起https请求时,遭遇了“The remote certificate is invalid according to the validation procedure”异 ...

  2. (转)The remote certificate is invalid according to the validation procedure

    If you get “The remote certificate is invalid according to the validation procedure” exception while ...

  3. .net core中Grpc使用报错:The remote certificate is invalid according to the validation procedure.

    因为Grpc采用HTTP/2作为通信协议,默认采用LTS/SSL加密方式传输,比如使用.net core启动一个服务端(被调用方)时: public static IHostBuilder Creat ...

  4. 异常处理之“The remote certificate is invalid according to the validation praocedure.”

    参考文章:http://brainof-dave.blogspot.com.au/2008/08/remote-certificate-is-invalid-according.html 参考文章:h ...

  5. SVN 错误:Error validating server certificate for 'https://xxxxxxx':443... Mac os svn客户端证书验证缓存 解决

    mac上的SVN今天突然间 不好使了 在进行SVN操作是报出警告信息 Error validating server certificate for 'https://xxxxxxx':443 - T ...

  6. use AP_VENDOR_PUB_PKG.Update_Vendor_Site_Public to u ORA-01722: invalid number in Package AP_VENDOR_PUB_PKG Procedure Update_Vendor_Site_Public

    ORA-01722: invalid number in Package AP_VENDOR_PUB_PKG Procedure Update_Vendor_Site_Public 发现此问题的经过: ...

  7. 用XCA(X Certificate and key management)可视化程序管理SSL 证书(3)--创建自己定义的凭证管理中心(Certificate Authority)

    在第"用XCA(X Certificate and key management)可视化程序管理SSL 证书(2)---创建证书请求"章节中,我们介绍了怎样用XCA创建SSL证书请 ...

  8. 【Azure API 管理】在APIM中使用客户端证书验证API的请求,但是一直提示错误"No client certificate received."

    API 管理 (APIM) 是一种为现有后端服务创建一致且现代化的 API 网关的方法. 问题描述 在设置了APIM客户端证书,用户保护后端API,让请求更安全. 但是,最近发现使用客户端证书的API ...

  9. Running a Remote Desktop on a Windows Azure Linux VM (远程桌面到Windows Azure Linux )-摘自网络(试了,没成功 - -!)

                              A complete click-by-click, step-by-step video of this article is available ...

随机推荐

  1. 算是学完了《Servlet&JSP学习笔记》,立此存照

    我感觉从构架上来说,算是入门了, 终于可以正式进入SPRING的学习啦...爽 代码就不弄了,真的太多了...花了差不多两周呢..

  2. jxl中报表单元格合并问题

    WritableWorkbook wwb = Workbook.createWorkbook(endFileName);WritableSheet ws = wwb.createSheet(" ...

  3. log显示error时的堆栈信息理解和分析

    error显示的log堆栈信息,是从最深层(最内层)的堆栈信息开始由内向外打印的. error显示的log堆栈信息,是从最深层(最内层)的堆栈信息开始由内向外打印的. error显示的log堆栈信息, ...

  4. 史上最全opencv源代码解读,opencv源代码具体解读文件夹

    本博原创,如有转载请注明本博网址http://blog.csdn.net/ding977921830/article/details/46799043. opencv源代码主要是基于adaboost算 ...

  5. 我们的一个已投产项目的高可用数据库实战 - mongo 副本集的搭建具体过程

    我们的 mongo 副本集有三台 mongo 服务器:一台主库两台从库. 主库进行写操作,两台从库进行读操作(至于某次读操作到底路由给了哪台,仲裁决定).实现了读写分离.这还不止,假设主库宕掉,还能实 ...

  6. 64位BASM学习随笔(一)

     64位BASM学习随笔(一) Delphi的BASM一直是我最喜爱的内嵌汇编语言,同C/C++的内联汇编相比,它更方便,更具灵活性,由于C/C++的内联汇编仅仅能是或插入式的汇编代码,函数花括号 ...

  7. Color a Tree HDU - 6241

    /* 十分巧妙的二分 题意选最少的点涂色 使得满足输入信息: 1 x的子树涂色数不少于y 2 x的子树外面涂色数不少于y 我们若是把2转化到子树内最多涂色多少 就可以维护这个最小和最大 如果我们二分出 ...

  8. suse的安装命令zypper,类似apt

    例子:添加11.3的官方软件和升级源zypper ar http://download.opensuse.org/distribution/11.3/repo/oss/ mainzypper ar h ...

  9. P1314 聪明的质监员 二分答案

    这个题我第一反应是线段树(雾),然后看了一眼题解之后就后悔了...前缀和...然后二分答案,然后就没有然后了. 题干: 小T 是一名质量监督员,最近负责检验一批矿产的质量.这批矿产共有 nnn 个矿石 ...

  10. centos7 二次封装定制