Hi,
I am writing an application that will be distributed to our clients, who may and may not have a proxy server. There are numerous calls to a web service that is on our public server. We use a proxy server at our company and when I run my application and it hits a call to the web service it fails:
I can get the code to work if I hard code the values that work for our proxy server i.e.
But in the case of this being on the client I won't know the credential for username, password & server name.
I tried using
These fail to work. The values appear to be empty for the first two but I believe that even though you cannot view these details the values will still be passed. The last one has been deprecated and also does not appear to work.
Can somebody please help?
Cheers, Dave.
I am writing an application that will be distributed to our clients, who may and may not have a proxy server. There are numerous calls to a web service that is on our public server. We use a proxy server at our company and when I run my application and it hits a call to the web service it fails:
The request failed with HTTP status 407: Proxy Authentication Required.
I can get the code to work if I hard code the values that work for our proxy server i.e.
Visual Basic:
Dim WebServices As New WebServices.GeneralWebServices
Dim dsResults As New DataSet
Dim nc As New Net.NetworkCredential("user", "password")
Dim wp As New Net.WebProxy("http://1.1.1.1:8000")
wp.Credentials = nc
WHLWebServices.Proxy = wp
dsResults = WebServices.call()
But in the case of this being on the client I won't know the credential for username, password & server name.
I tried using
Visual Basic:
System.Net.CredentialCache.DefaultNetworkCredentials
System.Net.CredentialCache.DefaultCredentials
System.Net.WebProxy.GetDefaultProxy
These fail to work. The values appear to be empty for the first two but I believe that even though you cannot view these details the values will still be passed. The last one has been deprecated and also does not appear to work.
Can somebody please help?
Cheers, Dave.