.Net, ASP.Net, C#, VB.net, SQL Server, Xml, CSS, Design Patterns related tips, tricks, code snippets, articles, links, thoughts, etc. from Binu & Subi Thayamkery.

Binu Thayamkery is a seasoned software architect with more than 13 years of experience in developing enterprise grade connected systems using Microsoft Technologies. In his current position as a lead consultant-solution architect with Prudential Financial, he is working on architecture of next generation investment reporting framework using .net 3.5/WCF/AJAX, etc. He holds a Masters Degree in Computer Science from Colorado State University. Subi Thayamkery is an experienced software developer with more than 8 years of developing various application software systems ranging from workflow automation systems to compliance management tools. She currently works as a technology consultant for Prudential Financial where she helps develop a new system for corportate governance department. She holds an Electrical Engineering degree from New Jersey Institute of Technology.

Thursday, August 21, 2008

Update to post: HOWTO: Get rid of " Could Not Establish Trust Relationship with Remote Server" error

Read original post here.
Older methods are now obselete. Use the following...

...
...
System.Net.ServicePointManager.ServerCertificateValidationCallback
+= new System.Net.Security.RemoteCertificateValidationCallback(RemoteCertValidateCallback);
...

and callback method...


public static bool RemoteCertValidateCallback(object sender, X509Certificate cert, X509Chain chain, System.Net.Security.SslPolicyErrors error)

{

    
return true;

}





or you can simply use (in c# only) anonnymous method,


System.Net.ServicePointManager.ServerCertificateValidationCallback

    +=
delegate

            (

            
object sender,

            
X509Certificate cert,

            
X509Chain chain,

            System.Net.Security.
SslPolicyErrors error

            )

{
return (true); };

0 comments: