[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework

Re: Kevin,All of what you said is well understood and I've got all my basescovered

Fawaz Ahmed

10/27/2011 6:02:00 AM

very old post but did you get this working? I'm stuck in a similar situation. any pointers?

> On Thursday, April 26, 2007 5:35 PM Brenton Unger - MCSD.NET wrote:

> 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);


>> On Friday, April 27, 2007 6:28 AM Kevin Spencer wrote:

>> 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.mi...
>>
>> "Brenton Unger - MCSD.NET" <brenton@ungernet.com> wrote in message
>> news:1177623341.491462.202080@n15g2000prd.googlegroups.com...


>>> On Monday, April 30, 2007 3:12 PM Brenton Unger - MCSD.NET wrote:

>>> 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
>>>
>>> On Apr 27, 5:28 am, "Kevin Spencer" <unclechut...@nothinks.com> wrote:



3 Answers

Fawaz Ahmed

10/27/2011 6:03:00 AM

0

very old post but did you get this working? I'm stuck in a similar situation. any pointers?

> On Thursday, April 26, 2007 5:35 PM Brenton Unger - MCSD.NET wrote:

> 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);


>> On Friday, April 27, 2007 6:28 AM Kevin Spencer wrote:

>> 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.mi...
>>
>> "Brenton Unger - MCSD.NET" <brenton@ungernet.com> wrote in message
>> news:1177623341.491462.202080@n15g2000prd.googlegroups.com...


>>> On Monday, April 30, 2007 3:12 PM Brenton Unger - MCSD.NET wrote:

>>> 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
>>>
>>> On Apr 27, 5:28 am, "Kevin Spencer" <unclechut...@nothinks.com> wrote:


>>>> On Thursday, October 27, 2011 1:02 AM Fawaz Ahmed wrote:

>>>> very old post but did you get this working? I'm stuck in a similar situation. any pointers?



Fawaz Ahmed

10/27/2011 6:03:00 AM

0

very old post but did you get this working? I'm stuck in a similar situation. any pointers?

> On Thursday, April 26, 2007 5:35 PM Brenton Unger - MCSD.NET wrote:

> 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);


>> On Friday, April 27, 2007 6:28 AM Kevin Spencer wrote:

>> 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.mi...
>>
>> "Brenton Unger - MCSD.NET" <brenton@ungernet.com> wrote in message
>> news:1177623341.491462.202080@n15g2000prd.googlegroups.com...


>>> On Monday, April 30, 2007 3:12 PM Brenton Unger - MCSD.NET wrote:

>>> 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
>>>
>>> On Apr 27, 5:28 am, "Kevin Spencer" <unclechut...@nothinks.com> wrote:


>>>> On Thursday, October 27, 2011 1:02 AM Fawaz Ahmed wrote:

>>>> very old post but did you get this working? I'm stuck in a similar situation. any pointers?


>>>>> On Thursday, October 27, 2011 1:03 AM Fawaz Ahmed wrote:

>>>>> very old post but did you get this working? I'm stuck in a similar situation. any pointers?



Fawaz Ahmed

10/27/2011 6:03:00 AM

0

very old post but did you get this working? I'm stuck in a similar situation. any pointers?

> On Thursday, April 26, 2007 5:35 PM Brenton Unger - MCSD.NET wrote:

> 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);


>> On Friday, April 27, 2007 6:28 AM Kevin Spencer wrote:

>> 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.mi...
>>
>> "Brenton Unger - MCSD.NET" <brenton@ungernet.com> wrote in message
>> news:1177623341.491462.202080@n15g2000prd.googlegroups.com...


>>> On Monday, April 30, 2007 3:12 PM Brenton Unger - MCSD.NET wrote:

>>> 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
>>>
>>> On Apr 27, 5:28 am, "Kevin Spencer" <unclechut...@nothinks.com> wrote:


>>>> On Thursday, October 27, 2011 1:02 AM Fawaz Ahmed wrote:

>>>> very old post but did you get this working? I'm stuck in a similar situation. any pointers?


>>>>> On Thursday, October 27, 2011 1:03 AM Fawaz Ahmed wrote:

>>>>> very old post but did you get this working? I'm stuck in a similar situation. any pointers?


>>>>>> On Thursday, October 27, 2011 1:03 AM Fawaz Ahmed wrote:

>>>>>> very old post but did you get this working? I'm stuck in a similar situation. any pointers?