473,406 Members | 2,281 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

WebExceptionStatus.TrustFailure

I developed a class library in vb.net to post an httprequest to a remote
server and before accepting the results I validate the certificate that was
returned. Everything works fine when I use a windows form to test the app,
but if I call the class library from an asp.net page I get the error
"WebExceptionStatus.TrustFailure" when I try to validate the certificate. I
don't know what I am missing here.

This is the code I am using to validate the Certificate

Try

'get the response from the internet resource webRes =
CType(webReq.GetResponse, HttpWebResponse) Catch e As WebException If
e.Status = WebExceptionStatus.TrustFailure Then

ValidateCertificate = ExperianCertificateValidation.CertErrorMessage

ExperianCertificateValidation.CertErrorMessage = ""

ElseIf e.Status = WebExceptionStatus.Timeout Then

ValidateCertificate = e.Message & vbCrLf & e.StackTrace Else

ValidateCertificate = "An error ocurred please contact MIS." & vbCrLf &
e.StackTrace End If Catch ex As Exception ValidateCertificate = ex.Message &
vbCrLf & ex.StackTrace End Try

--

TIA.!


Nov 20 '05 #1
0 1818

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Peter Rilling | last post by:
I am trying to use an HttpWebRequest object to get resource from a website. Now, some of the files that I try to get may not exist. I would like to check for that condition. When I call...
2
by: G Joseph | last post by:
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,...
1
by: Claudio Di Flumeri | last post by:
In my application I use a sort od LiveUpdate to download updates from internet. To do that, a .xml file hosted on an internet area contains all the relevant information (like version, dimension,...
1
by: DotNetMania | last post by:
i'm woking with webservice ... how should the client do when webservice service is down. what kind of exception would occur..? when my testing it always wait server's signal... best...
1
by: google | last post by:
I'm building a small ASPX page in C# to forward HTTP POST requests to another site. When the other site returns an HTTP error such as 404 or 405, I want to return that same HTTP status value to my...
10
by: Adam Honek | last post by:
Hi all, How would one test for internet connectivity in VB.NET instead of using the Win32 API methods? Thanks, Adam
0
by: SamD | last post by:
I have a Web Service that makes an HttpWebRequest with an HTTPS url, and the request fails: a WebException is throw on the GetResponse() call, with a TrustFailure status. The curious thing is that...
2
by: pedrito | last post by:
I've got an app that downloads from several concurrent threads. Occasionally, I get an expcetion trying to read the HttpWebResponse stream... Sorry, the code isn't short, but I figured best to...
1
by: johnd60 | last post by:
Hi there, First-time poster but long-time lurker. I've been working on an application in VB.NET which will serve as a web-installer on a client machine, looking locally for files on a list...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.