Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / April 2007

Tip: Looking for answers? Try searching our database.

"The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel"

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Brenton Unger - MCSD.NET - 26 Apr 2007 22:35 GMT
Alright Googler Groupers!

I've searched high and low and tried everything I care to, so I'll see
what the masses can conclude! I'm making both UPS and PayPal calls and
both of them *occaisionally* throw this error. Please help!

The error I receive is :

"The underlying connection was closed: Could not establish trust
relationship for the SSL/TLS secure channel"

The inner exception is:

"The remote certificate is invalid according to the validation
procedure"

My web.config has:

<system.net>
    <settings>
        <servicePointManager checkCertificateName="false"
checkCertificateRevocationList="false"/>
    </settings>
    <connectionManagement>
        <add address="*" maxconnection="12"/>
    </connectionManagement>
</system.net>

My Global.asax has:

ServicePointManager.CertificatePolicy = new CertificatePolicy();
ServicePointManager.ServerCertificateValidationCallback = new
RemoteCertificateValidationCallback(ValidationCallBack);

My CertificationPolicy class looks like:

public bool CheckValidationResult(ServicePoint sp, X509Certificate
cert, WebRequest req, int problem)
{
    return true;
}

And finally, my code is:

HttpRequestHandler http = new HttpRequestHandler(connectionURL);
string response = http.POST(stuffToPost);
Kevin Spencer - 27 Apr 2007 11:28 GMT
You're making a remote method call to a network service. Any time you do
such a thing, your app has a dependency upon something it has no control
over, and which is dependent upon a variety of circumstances over which your
app has no control. Therefore, you cannot expect it to always succeeed.
There are so many things that can go wrong with an Internet messaging
connection that it is amazing that the Internet works at all. Part of the
reason is that there are safeguards built into networked systems, such as
redundancy, round-robin, and Cyclic Redundancy Checks, and so on.

Signature

HTH,

Kevin Spencer
Microsoft MVP

Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net

> Alright Googler Groupers!
>
[quoted text clipped - 42 lines]
> HttpRequestHandler http = new HttpRequestHandler(connectionURL);
> string response = http.POST(stuffToPost);
Brenton Unger - MCSD.NET - 30 Apr 2007 20:12 GMT
Kevin,

All of what you said is well understood and I've got all my bases
covered in the event that I'm not able to communicate with the other
machines. Thanks for the input, though.

The problem here is not that I'm not able to communicate with the
remote machines; but rather that I'm communicating fine I'm just not
able to tell the framwork to accept the certificate! Obviously the
framework itself is having a problem accepting a certificate
regardless of the fact that I'm telling it in every way I know how to
direct the framework to do so to accept it.

Does anyone else have any input that can help out?

TIA

~Brenton

> You're making a remote method call to a network service. Any time you do
> such a thing, your app has a dependency upon something it has no control
[quoted text clipped - 63 lines]
>
> - Show quoted text -

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.