Re: "The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel"
- From: "Kevin Spencer" <unclechutney@xxxxxxxxxxxx>
- Date: Fri, 27 Apr 2007 06:28:32 -0400
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.
--
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
"Brenton Unger - MCSD.NET" <brenton@xxxxxxxxxxxx> wrote in message
news:1177623341.491462.202080@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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);
.
- Follow-Ups:
- Re: "The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel"
- From: Brenton Unger - MCSD.NET
- Re: "The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel"
- References:
- "The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel"
- From: Brenton Unger - MCSD.NET
- "The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel"
- Prev by Date: Re: Control the CPU Utilization during Application Execution written C
- Next by Date: Re: Build "Release" for asp.net website
- Previous by thread: "The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel"
- Next by thread: Re: "The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel"
- Index(es):
Relevant Pages
|