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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T06:41:20+00:00 2026-05-18T06:41:20+00:00

I have a server with multi ip addresses. Now I need to communicate with

  • 0

I have a server with multi ip addresses. Now I need to communicate with several servers with http protocol. Each server only accept the request from a specified ip address of my server. But when using WebRequest(or HttpWebRequest) in .NET , the request object will choose a ip address automatically. I can’t find anyway to bind the request with a address.

Is there anyway to do so ? Or I have to implement a webrequest class myself ?

  • 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-18T06:41:20+00:00Added an answer on May 18, 2026 at 6:41 am

    You need to use the ServicePoint.BindIPEndPointDelegate callback.

    http://blogs.msdn.com/b/malarch/archive/2005/09/13/466664.aspx

    The delegate is called before the socket associated with the httpwebrequest attempts to connect to the remote end.

    public static IPEndPoint BindIPEndPointCallback(ServicePoint servicePoint, IPEndPoint remoteEndPoint, int retryCount)
    {
        Console.WriteLine("BindIPEndpoint called");
          return new IPEndPoint(IPAddress.Any,5000);
    
    }
    
    public static void Main()
    {
    
        HttpWebRequest request = (HttpWebRequest) WebRequest.Create("http://MyServer");
    
        request.ServicePoint.BindIPEndPointDelegate = new BindIPEndPoint(BindIPEndPointCallback);
    
        HttpWebResponse response = (HttpWebResponse)request.GetResponse();
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a server access log, with timestamps of each http request, I'd like
we have designed a multi threaded server that use linq to sql at each
I have a PHP application and now I need to implement multi language support.
I currently have heavily multi-threaded server application, and I'm shopping around for a good
I have a multi-user ASP.NET app running against SQL Server and want to have
OK, so I have a very large multi-threaded unmanaged c++ application (server) that runs
Using SQL Server 2008, I have a requirement that email addresses in my user
I have a fairly complex multi threaded application (server) that from time to time
I have an application running on a JBoss server. We need update the application
My requirement is I have server J2EE web application and client J2EE web application.

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.