惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
The Blog of Author Tim Ferriss
S
Securelist
D
Docker
The Register - Security
The Register - Security
GbyAI
GbyAI
Recorded Future
Recorded Future
Engineering at Meta
Engineering at Meta
Stack Overflow Blog
Stack Overflow Blog
云风的 BLOG
云风的 BLOG
P
Proofpoint News Feed
罗磊的独立博客
博客园 - 【当耐特】
F
Full Disclosure
WordPress大学
WordPress大学
腾讯CDC
小众软件
小众软件
大猫的无限游戏
大猫的无限游戏
D
DataBreaches.Net
SecWiki News
SecWiki News
L
Lohrmann on Cybersecurity
I
InfoQ
MyScale Blog
MyScale Blog
量子位
Cyberwarzone
Cyberwarzone
博客园 - 三生石上(FineUI控件)
The Hacker News
The Hacker News
F
Fortinet All Blogs
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Jina AI
Jina AI
博客园_首页
H
Help Net Security
K
Kaspersky official blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Webroot Blog
Webroot Blog
Blog — PlanetScale
Blog — PlanetScale
V
Vulnerabilities – Threatpost
Y
Y Combinator Blog
The Cloudflare Blog
P
Proofpoint News Feed
V
Visual Studio Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
T
Tailwind CSS Blog
爱范儿
爱范儿
P
Privacy International News Feed
Security Archives - TechRepublic
Security Archives - TechRepublic
The GitHub Blog
The GitHub Blog
C
Cybersecurity and Infrastructure Security Agency CISA
B
Blog RSS Feed

博客园 - sayo.net

website the breakpoint will not currently be hit. no symbols have been loaded for this document How to add MS Test to post build 在WCF中使用REST时,如何去掉URL中的.svc后缀 Resolve Error: The service cannot be activated because it does not support ASP.NET compatibility. Resolve Error: Service has zero application (non-infrastructure) endpoints. Could not find a base address that matches scheme http for the endpoint with binding MetadataExchangeHttpBinding. Resolve error: Could Not Load Type ‘System.ServiceModel.Activation.HttpModule’ 在IIS7.5上运行Message Security with UserName的WCF Service WCF部署问题两则 SQL Server Mangement Studio无法创建Database Dagrams的简单解决办法 一些有用的WCF相关链接 [Android开发]如何自定义ArrayAdapter 让Android的emulator支持web camera 如何旋转Android Emulator HTC Hero Android 2.1 真机调试 HTC Hero Android 2.1 真机调试 CouchDB系列 - 安装CouchDB Test from Windows Live Writer Silverlight Toolkit初探
WCF Could not establish trust relationship for the SSL/TLS secure channel with authority
sayo.net · 2011-04-19 · via 博客园 - sayo.net

A custom remote certificate validation can be used to avoid the strict validation, instead, just make it trust anything.

In your code, simply make a call to the static method SetCertificatePolicy() once within your application before making any request to the web services.

// note this code is not intended to used 
    
// in production enviroment
    public static class Util
    {
        
/// <summary>
        
/// Sets the cert policy.
        
/// </summary>
        public static void SetCertificatePolicy()
        {
            ServicePointManager.ServerCertificateValidationCallback 
+= RemoteCertificateValidate;
        }
/// <summary>
        
/// Remotes the certificate validate.
        
/// </summary>
        private static bool RemoteCertificateValidate(
           
object sender, X509Certificate cert,
            X509Chain chain, SslPolicyErrors error)
        {
            
// trust any certificate!!!
            System.Console.WriteLine("Warning, trust any certificate");
            
return true;
        }
    }