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

we have designed a multi threaded server that use linq to sql at each
I have been building a multi threaded server, with each thread having a single
On SQL Server 2005, I have a complex multi-level allocation process which looks like
I have a client server application with multi-threading. The server side is failing with
I have a multi-threaded, multi-server web application with hibernate and spring managing transactions with
I have a web server based on paste.httpserver as an adapater between HTTP and
Example, I have 2 server, each server using a copy of linux cpanel. I
I have a server application and a client application. I'm using socket to communicate
I am currently experimenting with building an http server. The server is multi-threaded by
OK, so I have a very large multi-threaded unmanaged c++ application (server) that runs

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.