473,378 Members | 1,658 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,378 software developers and data experts.

SSL Web Service Proxy Authentication

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.X509 Certificate, _
ByVal
request As System.Net.WebRequest, _
ByVal
certificateProblem As Integer) As Boolean Implements
System.Net.ICertificatePolicy.CheckValidationResul t

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


Nov 23 '05 #1
3 9595
Check this:
http://discuss.fogcreek.com/dotnetqu...ow&ixPost=5463

Thanks,
Warm Regards,
Arun Ganesh.

"Toby" wrote:
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.X509 Certificate, _
ByVal
request As System.Net.WebRequest, _
ByVal
certificateProblem As Integer) As Boolean Implements
System.Net.ICertificatePolicy.CheckValidationResul t

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


Nov 23 '05 #2
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

"Arun Ganesh_MVP" wrote:
Check this:
http://discuss.fogcreek.com/dotnetqu...ow&ixPost=5463

Thanks,
Warm Regards,
Arun Ganesh.

"Toby" wrote:
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.X509 Certificate, _
ByVal
request As System.Net.WebRequest, _
ByVal
certificateProblem As Integer) As Boolean Implements
System.Net.ICertificatePolicy.CheckValidationResul t

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


Nov 23 '05 #3
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/2.../04/41154.aspx

Regards
Shaun

"Rusty" wrote:
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

"Arun Ganesh_MVP" wrote:
Check this:
http://discuss.fogcreek.com/dotnetqu...ow&ixPost=5463

Thanks,
Warm Regards,
Arun Ganesh.

"Toby" wrote:
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.X509 Certificate, _
ByVal
request As System.Net.WebRequest, _
ByVal
certificateProblem As Integer) As Boolean Implements
System.Net.ICertificatePolicy.CheckValidationResul t

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


Nov 23 '05 #4

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

Similar topics

5
by: Farooque Khan | last post by:
Hi, I am consuing a web service in a VC7 application. I included the web service as a 'web reference' and calling it's method. Now I want my application to connect to the web service through a...
0
by: George | last post by:
Hello, I'm running an ASPX application "WebApplication1" which consumes a web service (service1.asmx) hosted on a machine with IP (128.1.7.x) . The web service is located in the intranet. The...
3
by: Wild Wind | last post by:
Hello all, I apologise in advance for the long windedness of this post, but I feel that if I am going to get any solution to this problem, it is important that I present as much information...
0
by: John Bown | last post by:
This query is similar to some others on this discussion group, but none of them were resolved! Can anybody help: The issue is related to integrated authentication. First I'll describe a simple...
1
by: webserviceUser189 | last post by:
Hi, I'm trying to authenticate the user based on the credentials that I get from the client app, but I'm getting empty string as user name. Can somebody tell me if I'm doing anything wrong here....
0
by: Punit | last post by:
Hello, I have an unmanaged VC7 app (ActiveX control implemented using MFC) calling a C# dotnet service. I'm using the VS2003 generated proxy class derived from CSoapSocketClientT. The activeX...
0
by: Armin Prosch | last post by:
Hi, we call a web service in an intranet environment. The target host is bypassed as of the IE setting. We retrieve the system proxy settings through "myService.Proxy =...
3
by: =?Utf-8?B?RGFuZGFuIFpoYW5n?= | last post by:
Now I have a web application, a web service and a SQL Server database. The Web application will invoke the web service, the web service invokes the SQL Server stored procedure. I let the web...
10
by: Ben | last post by:
I'm trying to access a c# web service from a web form. I set up the web reference proxy object as follows: proxy.PreAuthenticate = true; proxy.Credentials = CredentialCache.DefaultCredentials;...
4
by: Jon | last post by:
I wrote a VS 2005 C# express programme that accesses a web service. It works fine when there's a direct connection to the internet, but on two different PCs with internet access via a proxy, I get...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.