Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 553045
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:33:50+00:00 2026-05-13T11:33:50+00:00

An application I’m writing needs to use .Net Remoting (I’m aware that WCF is

  • 0

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).

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.

I have the following problems:

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.

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.

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!

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?

Any help is much appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T11:33:51+00:00Added an answer on May 13, 2026 at 11:33 am

    I have found the solution to this problem (unfortunately I have lost the address of the blog which led me to this – if I can find it again I will give due credit), and it works perfectly. For anybody who is interested, add the following code:

        private static void SetChannelProxy(HttpClientChannel channel, IWebProxy proxy)
        {
            FieldInfo proxyObjectFieldInfo = typeof(HttpClientChannel).GetField("_proxyObject", BindingFlags.Instance | BindingFlags.NonPublic);
    
            proxyObjectFieldInfo.SetValue(channel, proxy);
        }
    

    You should first configure your proxy object using the credentials you wish to use, and then call this method with the channel you want to use with the proxy.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My application has one activity which starts two services but does not bind them.
my application use 10 threads that to read a lot of html file.similar the
My application that is not on Play Store verify on the web If there
Application is a C# .Net 3.5 WCF Service. I'd like during the build process
Application use NHibernate. I Have object A that contains set of objects B. I
Application able to record error in OnError, but we are not able to do
Application rejected due to do not back up reason I tried one thing to
Application : HTA (therefore IE) This is an application that uses SendKeys to populate
The application I'm currently writing is using MVVM with the ViewModel-first pattern. I have
application = webapp.WSGIApplication( [(r'/main/profile/([a-f0-9]{40})', ProfileHandler)], debug=True) The regex in the above parameter will not

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.