Hello All,
I am working on a desktop application using C#. The application
connects to a remote webservice to update and retrieve data from a
database. I also have a settings Tab in the application UI that allows
the user to enter the proxy server information if needed.
When the user selects the "Use Proxy" Checkbox in the settings tab, I
ask them to provide the server address and port number and also the
login information is required. I am using the WebProxy class to add the
proxy setting to the webservice object.
service.Proxy = new WebProxy(this.strProxyServerAddress);
where service is an object of the wrapper class to access the
webservice.
The issue:
When the user does not select the "Use Proxy Server" setting, I do not
attach a Proxy to the request but it seems to be picking up the default
Proxy server settings on the machine.
The expected behavior here should be that if a proxy server is required
to access the internet and the user has not selected the "Use Proxy"
option in the application then the connection should fail.
Question:
Is there any way of setting the
Microsoft.Web.Services2.WebServicesClientProtocol object not to use a
proxy server at all ?
Thanks in advance