title: How do I use .Net Remoting through a web proxy?
body: <p>An application I'm writing needs to use .Net Remoting (I'm aware that WCF is the 'new thing', but it is unfortunately not an option available to us at this time).</p>
  
  <p>Anyway, everything works fine if I don't try to use the application through a proxy. However, the application needs to be able to function through proxy web servers. I set up a HttpChannel and set the 'proxyName' and 'proxyPort' properties to their correct values. This allows the channel to use the proxy server no problem.</p>
  
  <p>I have the following problems:</p>
  
  <p>1: If the proxy server requires authentication, there seems to be no way to set the credentials the channel should use to auth with the proxy. I've tried both the 'credentials' property, and the 'username' and 'password' properties, but it doesn't seem to work. So the end result in a case where the proxy server requires authentication, and just returns an authentication error whenever the remote method is called.</p>
  
  <p>2: I cannot seem to get the HttpChannel to use the default system web proxy. If Internet Explorer is configured to use a proxy, I should just be able to use WebRequest.GetSystemWebProxy() to get it. However, this returns an IWebProxy, and I cannot extract the host and port from this. If anybody knows of a way to do this, I would greatly appreciate it.</p>
  
  <p>What is frustrating is that if you step through the code using Visual Studio and examine the HttpChannel class, there is a WebProxy object. Life would be so much easier if they provided access to that!</p>
  
  <p>So basically what I'm asking is how on earth do I get a HttpChannel to use a web proxy correctly - bearing in mind that I need to be able to use a proxy which requires authentication, and the ability to auto-detect the Internet Explorer proxy settings? Is there a simpler way to instantiate the channel so that I can just pass it a proxy object as a parameter?</p>
  
  <p>Any help is much appreciated!</p>