WebException.TrustFailure from HttpwebRequest

  • Thread starter Thread starter G Joseph
  • Start date Start date
G

G Joseph

Hello,
I am getting a WebException.TrustFailure when I call
HttpwebRequest.GetResponse. Anybody has an idea how to
resolve this issue? The code works correctly in other
sites. I noticed that, when I browse to the site using
IE, I am getting a security Alert messagebox prompting to
accept the certificate. Is there a relationship between
this two problems? How can I resolve it?

Thanks
-GJK
 
"G Joseph" spoke:
Hello,
I am getting a WebException.TrustFailure when I call
HttpwebRequest.GetResponse. Anybody has an idea how to
resolve this issue? The code works correctly in other
sites. I noticed that, when I browse to the site using
IE, I am getting a security Alert messagebox prompting to
accept the certificate. Is there a relationship between
this two problems? How can I resolve it?

Yes, that's likely a problem for your code as well. It seems the
framework's default certificate policy rejects that particular
certificate. Check out

http://msdn.microsoft.com/library/default.asp?url=/library/en-
us/cpref/html/frlrfSystemNetServicePointManagerClassCertificatePolicyTop
ic.asp

Cheers,
 
Hello Joseph,

Please post here if the problem is not resolved. Thanks.

Best regards,
Yanhong Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
!Content-Class: urn:content-classes:message
!From: "G Joseph" <[email protected]>
!Sender: "G Joseph" <[email protected]>
!Subject: WebException.TrustFailure from HttpwebRequest
!Date: Sat, 19 Jul 2003 14:59:03 -0700
!Lines: 11
!Message-ID: <[email protected]>
!MIME-Version: 1.0
!Content-Type: text/plain;
! charset="iso-8859-1"
!Content-Transfer-Encoding: 7bit
!X-Newsreader: Microsoft CDO for Windows 2000
!X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
!Thread-Index: AcNOQPfJEKecHaS1SeyTzhfQ2BoYsA==
!Newsgroups: microsoft.public.dotnet.framework.aspnet
!Path: cpmsftngxa06.phx.gbl
!Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:160529
!NNTP-Posting-Host: TK2MSFTNGXA13 10.40.1.165
!X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
!
!Hello,
!I am getting a WebException.TrustFailure when I call
!HttpwebRequest.GetResponse. Anybody has an idea how to
!resolve this issue? The code works correctly in other
!sites. I noticed that, when I browse to the site using
!IE, I am getting a security Alert messagebox prompting to
!accept the certificate. Is there a relationship between
!this two problems? How can I resolve it?
!
!Thanks
!-GJK
!
 
Back
Top