1
Reply

Consume web service behind firewall

Baris Turkoglu

Baris Turkoglu

Apr 20 2012 3:47 AM
14.3k
Hello

I've followed the article that describes how to consume a webservice behind a firewall but I still get "The remote server returned an error: (407) Proxy Authentication Required" when I'm trying to call a function in my DLL ..

Here is my code:

  // Instantiate the WebProxy class
  WebProxy myProxy = new WebProxy("http.hiddenproxy.com:80", true);
  myProxy.Credentials = new NetworkCredential("username", "password", "domain");

  // Instantiate the WebService class
  CoCExchange sr = new CoCExchange();
  sr.Proxy = myProxy; // Set the proxy to the class
  sr.VerifyCoC("1853212");  //Here I get the 407

Can someone please aid me in my eternal searching for an answer?

Best regards
Baris

Answers (1)