SSL handshake error
SSL handshake error
SSL handshake error
SSL handshake error
SSL handshake error
SSL handshake error SSL handshake error SSL handshake error SSL handshake error SSL handshake error SSL handshake error SSL handshake error
SSL handshake error SSL handshake error
SSL handshake error
General Topics include: .NET Framework
Note: Most posts can be categorized into one of the forums below, where experts on that topic will be able to help you find a solution to your problem faster and more efficiently.

Enjoy an ad free experience by logging in. Not a member yet? Register.
Go Back  Xtreme .NET Talk > > > SSL handshake error


Reply
 
Thread Tools Display Modes
  #1  
Old 01-11-2018, 03:02 AM
lamy's Avatar
lamy lamy is offline
Regular

Preferred language:
C#, VB.NET
 
Join Date: Dec 2005
Location: under your bed
Posts: 69
lamy is on a distinguished road
Default SSL handshake error



We are consuming a webservice using Add Web References, all of the method works except for one which gives out this error "The request was aborted: Could not create SSL/TLS secure channel".

Tried adding the code below before consuming the webservice but still get the same error.

Code:
        private static bool AllwaysGoodCertificate(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors policyErrors)
        {
            return true;
        }

// before consuming the webservice
            ServicePointManager.Expect100Continue = true;
            ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;           
            ServicePointManager.ServerCertificateValidationCallback += new RemoteCertificateValidationCallback(AllwaysGoodCertificate);
Anyone knows how to resolve this?
__________________
slow down when you need to hurry, stop when you need to move on,
look back when you need to forget, or you might slip and leave sanity
Reply With Quote
Reply

Bookmarks

Tags
webservice, consuming, error, true;, x509chain, sslpolicyerrors, policyerrors, chain, private, static, bool, x509certificate, sender, certificate, resolve, securityprotocoltype.ssl3, securityprotocoltype.tls, return, code, method, references, web, handshake, add, channel

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
I need my Windows Authentication Custom Error Pages to work for 401 error dfranco ASP.NET 0 11-20-2003 12:57 PM
Help!.. Jscript Compilation Error - Syntax Error /> Mykro General 2 11-04-2003 07:01 PM
unkown undo/redo error and compiler error mskeel General 3 10-30-2003 04:37 PM
Parser Error / Server Error danomatic ASP.NET 2 02-20-2003 09:05 PM

Advertisement:







Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
SSL handshake error
SSL handshake error
SSL handshake error SSL handshake error
SSL handshake error
SSL handshake error
SSL handshake error SSL handshake error SSL handshake error SSL handshake error SSL handshake error SSL handshake error SSL handshake error
SSL handshake error
SSL handshake error
 
SSL handshake error
SSL handshake error