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

  • Home
  • SEARCH
  • 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 7070097
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T05:31:30+00:00 2026-05-28T05:31:30+00:00

I have a VM that runs a few web crawling console applications. I’m wondering

  • 0

I have a VM that runs a few web crawling console applications. I’m wondering how do you use a different proxy per console application. Most of the proxy C# stuff I find changes the registry, however this changes all console apps not just one.

Anybody have an example of how to use a specific proxy for a specific console app without effective all other console apps?

Looking for a source code solution

  • 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-28T05:31:31+00:00Added an answer on May 28, 2026 at 5:31 am

    Assuming your console application’s use one of the built-in methods for downloading web pages (WebClient, HttpWebRequest, etc.), they all have a Proxy Property which should do what you’re after. They pretty much all work the same so here’s the example provided by the MSDN documentation for HttpWebRequest.Proxy:

    // Create a new request to the mentioned URL.               
    HttpWebRequest myWebRequest=(HttpWebRequest)WebRequest.Create("http://www.microsoft.com");
    
    // Obtain the 'Proxy' of the  Default browser.  
    IWebProxy proxy = myWebRequest.Proxy;
    // Print the Proxy Url to the console.
    if (proxy != null)
    {
        Console.WriteLine("Proxy: {0}", proxy.GetProxy(myWebRequest.RequestUri));
    } 
    else
    {
        Console.WriteLine("Proxy is null; no proxy will be used");
    }
    
    WebProxy myProxy=new WebProxy();
    
    Console.WriteLine("\nPlease enter the new Proxy Address that is to be set:");
    Console.WriteLine("(Example:http://myproxy.example.com:port)");
    string proxyAddress;
    
    try
    {
        proxyAddress =Console.ReadLine();
        if(proxyAddress.Length>0)
        {
        Console.WriteLine("\nPlease enter the Credentials (may not be needed)");
        Console.WriteLine("Username:");
        string username;
        username =Console.ReadLine();
        Console.WriteLine("\nPassword:");
        string password;
        password =Console.ReadLine();                   
        // Create a new Uri object.
        Uri newUri=new Uri(proxyAddress);
        // Associate the newUri object to 'myProxy' object so that new myProxy settings can be set.
        myProxy.Address=newUri;
        // Create a NetworkCredential object and associate it with the 
        // Proxy property of request object.
        myProxy.Credentials=new NetworkCredential(username,password);
        myWebRequest.Proxy=myProxy;
        }
        Console.WriteLine("\nThe Address of the  new Proxy settings are {0}",myProxy.Address);
        HttpWebResponse myWebResponse=(HttpWebResponse)myWebRequest.GetResponse();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a program that runs in a few threads. The main thread shares
I currently have a python script that runs every few minutes and picks up
I have an application that runs transactions spanning over multiple databases on the same
We have an Apache tomcat server that runs a current web service. We were
I have built a few custom applications that run on WSS 3 using the
We have a few different websites running on the same server that all access
I have a ASP.NET Web Forms application that internally makes many SOAP and REST
I have written an ASP.NET web page with C# behind that runs an existing
I have a script in PHP that runs a few things automatically on SugarCRM
I have the following situation. I have an application that runs mostly on one

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.