Using a Proxyserver

Feb 9 2005 9:17 AM
Hi, i do not know if my problem is a common bug, but i found no solution. Within my application i want to use a proxserver to connect with a .NET Webservice. But everytime I get the 407 Error 'Proxy authentication required'. I attached my code, where you can see that i try to solve my problem by using the Proxy Object of my Webservice instance and additionally use the GlobalProxySelection Object: WebProxy myProxy = new WebProxy(myProxyAdress); myWebservice.Proxy = myProxy; myWebservice.PreAuthenticate = true; // do not know if this is necassary System.Net.ICredentials credentials = new System.Net.NetworkCredential(this.proxyUser, this.proxyPWD, this.domain); //here i set the credential of my webservice instance, which i mean is not necessary. myWebservice.Credentials = credentials; //here i set the credentials of the Proxy Object of my Webserive Instance. myWebservice.Proxy.Credentials = credentials; further I tried the following Code: GlobalProxySelection.Select = new WebProxy(myProxyAdress); System.Net.ICredentials credentials = new System.Net.NetworkCredential(this.proxyUser, this.proxyPWD, this.domain); GlobalProxySelection.Select.Credentials = credentials; Both examples result in the 407 error, while the same Code on a Win32 plattform still works. May someone help me, I realy get confused about this problem. Thx in advance. Matthias Schröder