all groups > dotnet web services > february 2005 >
You're in the

dotnet web services

group:

SSL Web Service Proxy Authentication


SSL Web Service Proxy Authentication Toby
2/25/2005 1:24:01 AM
dotnet web services:
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



RE: SSL Web Service Proxy Authentication Arun Ganesh_MVP
2/26/2005 3:25:01 AM
Check this:
http://discuss.fogcreek.com/dotnetquestions/default.asp?cmd=show&ixPost=5463

Thanks,
Warm Regards,
Arun Ganesh.

[quoted text, click to view]
RE: SSL Web Service Proxy Authentication Rusty
2/27/2005 11:15:03 AM
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

[quoted text, click to view]
RE: SSL Web Service Proxy Authentication Rusty
2/27/2005 12:11:03 PM
Hi. I have solved my problem by creating a custom policy to deal with the
fact that I'm using a test certificate. I found the solution in the following
blog

http://weblogs.asp.net/jan/archive/2003/12/04/41154.aspx

Regards
Shaun

[quoted text, click to view]
AddThis Social Bookmark Button