Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / February 2005

Tip: Looking for answers? Try searching our database.

SSL Web Service Proxy Authentication

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Toby - 25 Feb 2005 01:22 GMT
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
Arun Ganesh_MVP - 26 Feb 2005 11:24 GMT
Check this:
http://discuss.fogcreek.com/dotnetquestions/default.asp?cmd=show&ixPost=5463

Thanks,
Warm Regards,
Arun Ganesh.

> After running the following code i get the error.
>
[quoted text clipped - 49 lines]
>
> End Sub
Rusty - 27 Feb 2005 19:14 GMT
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

> Check this:
> http://discuss.fogcreek.com/dotnetquestions/default.asp?cmd=show&ixPost=5463
[quoted text clipped - 56 lines]
> >
> > End Sub
Rusty - 27 Feb 2005 20:11 GMT
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

> 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
[quoted text clipped - 65 lines]
> > >
> > > End Sub

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.