Question Script Error comes up with HttpWebRequest

digitaldrew

Well-known member
Joined
Nov 10, 2012
Messages
167
Programming Experience
Beginner
Hope someone can help me out with this..I'm initiating an httpwebrequest that will go through a list of terms and search them. The first search seams to go through fine, but every search after that shows this annoying popup after the webrequest is made and won't proceed until you click Yes or No..

9GoSmGO.jpg


I thought this might be some kind of SSL error so I tried adding the following code..but it didn't work:
VB.NET:
    Public Function AcceptAllCertifications(ByVal sender As Object, ByVal certification As System.Security.Cryptography.X509Certificates.X509Certificate, ByVal chain As System.Security.Cryptography.X509Certificates.X509Chain, ByVal sslPolicyErrors As System.Net.Security.SslPolicyErrors) As Boolean
        Return True
    End Function

Then adding this right before my webrequest:
VB.NET:
ServicePointManager.ServerCertificateValidationCallback = AddressOf AcceptAllCertifications

Anyone know what could be causing this? Is there any way to turn it off or ignore any kind of popups with the httpwebrequest?

Thanks!
 
This was actually coming from a webbrowser I had in there - not httpwebrequest. I resolved the issue by adding this:
wb.ScriptErrorsSuppressed = True
 
Back
Top