I have a client program that uses a web service. It works quite well in a number of installations. Now I have a situation where a new client connects to the Internet through a proxy server, and my program attempt to access the web service receives the message "HTTP status 407: Proxy authentication required".
I thought that all the settings for Internet access, including the proxy server address, port number and authentication, would be done in the settings of the control panel of the control panel, and I would not have to worry about this in the code or even in app.config, the web service client .
Did I get it wrong?
What I did on average gives the user the ability to configure the proxy user name and password, and then in my code I do the following:
webServiceClient.ClientCredentials.UserName.UserName = configuredUsername; webServiceClient.ClientCredentials.UserName.Password = configuredPassword;
But I do not know what is right. Since it seems to me that the aforementioned ClientCredentials will refer to the binding / security of the web service, and not to the Internet proxy.
I suppose I can try it from a client, but I would rather be sure what I do first.
authentication web-services proxy internet-connection
Peter
source share