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 6747551
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:27:28+00:00 2026-05-26T12:27:28+00:00

We have a background operation (Window service) that we want to use through a

  • 0

We have a background operation (Window service) that we want to use through a proxy server.

Basically, we’re doing this:

public WebClient GetWebClient(){
   var webClient = new WebClient();
   webClient.proxy = new WebProxy(Configuration.ProxyHost, Configuration.ProxyPort);

   // add a bunch of headers to the WebClient (sessionids, etc.)

   return webClient;
}

The proxy is one that we have configured ourselves using FreeProxy.

I’ve enabled logging and on the machine I’m testing with, and can confirm that requests are being made to the proxy when using it in Firefox.

No authentication is required for the proxy server, except that the IP has to be within our office (which from the Firefox evidence, I assume is not the problem).

However, within our background process, I don’t seem to be using the proxy when I use the webclient:

using(var wc = GetWebClient())
using(var s = wc.OpenRead("someurl"))
using(var sr = new StreamReader(s)){
    return sr.ReadToEnd();
}

I receive no errors from the proxy however, it seems like we’re just going along without it even though the proxy has explicitly been set.

The information seems to return fine, just not through our proxy.

Is there something I’m missing when using a proxy with a WebClient?

edit: more details. If we disable the proxy service on the server, then we get an exception that we can’t connect. So it seems like the webclient is attempting to reach out to the proxy, but that traffic is not actually flowing through the proxy.

Inner Exception: SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
  • 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-26T12:27:29+00:00Added an answer on May 26, 2026 at 12:27 pm

    It turns out that FreeProxy wasn’t accepting HTTPS traffic.

    I guess the proxy must return the types of traffic it can route, and if it cannot, the webclient does nothing.

    Switched to using the Burp suite as our proxy since it can accept HTTPS.

    http://portswigger.net/burp/

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

Sidebar

Related Questions

I have a timely operation that runs on a background thread. While running, I
Background This question is in two parts. I have a one-way WCF operation hosted
I have a background thread that handles communication with an external service. Each time
Background I have a Windows service that uses various third-party DLLs to perform work
I have a background worker running a long database task. i want to show
I have a background thread running that fires events, but how can I ensure
I am getting this error on code that used to work. I have not
Background information: I presently have a hardware device that connects to the USB port.
I have an application that works fine in an older project (that doesn't use
The background to this query was this question . I have installed this driver

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.