SSL Web Service Proxy Authentication

T

Toby

After running the following code i get the error.


An unhandled exception of type 'System.NotSupportedException' occurred in
system.dll
Additional information: The ServicePointManager does not support proxies of
https scheme.

All i'm trying to do is authenticate to a proxy and then use a web service.
everything is over https

Please any help would be great.

Toby

Public Class TrustAllCertificatePolicy
Implements System.Net.ICertificatePolicy

Sub New()
End Sub

Public Function CheckValidationResult(ByVal srvPoint As
System.Net.ServicePoint, _
ByVal
certificate As
System.Security.Cryptography.X509Certificates.X509Certificate, _
ByVal
request As System.Net.WebRequest, _
ByVal
certificateProblem As Integer) As Boolean Implements
System.Net.ICertificatePolicy.CheckValidationResult

Return True

End Function

End Class

Private Sub Test()

Dim oCD As New cdprocess.CDProcess
Dim cache As CredentialCache = New CredentialCache
Dim proxyObject As New WebProxy("https://secureproxy", True)

cache.Add(New Uri("https://secureproxy"), "Basic", New
NetworkCredential("username", "password"))
oCD.Proxy = proxyObject
oCD.Proxy.Credentials = cache
System.Net.ServicePointManager.CertificatePolicy = New
TrustAllCertificatePolicy

Me.TextBox1.Text = oCD.Test("username", "password")

End Sub
 
R

Rusty

I am testing a web service on my notebook using SSL. There is no proxy
settings required since I am not running a proxy server. But yet I am getting
the same message. Any thoughts ?

Thanks in advance

Regards
Shaun
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top