0

I have a server (server A) that has several public IP addresses. I am building a desktop application that will run on server A to fetch data from another server (server B) using the httpwebrequest class.

What I would like to do is be able to programatically direct the application to use a specific IP address from the one the server (A) has.

Is this possible?

Dave M
  • 1,302
  • 1
  • 16
  • 28
Andres
  • 192
  • 1
  • 14
  • possible duplicate of [how to change originating IP in HttpWebRequest](http://stackoverflow.com/questions/3345387/how-to-change-originating-ip-in-httpwebrequest) – shf301 Dec 04 '11 at 05:42

2 Answers2

0

This is a controlled by the networking configuration in the operating system. Look into using routing metrics so that the desired IP interface shows up with the least cost path to your destination.

Joel Coehoorn
  • 399,467
  • 113
  • 570
  • 794
0

how to change originating IP in HttpWebRequest

Check out that post, looks like the exact question and answer you are asking :) cheers!

Community
  • 1
  • 1
Mike McMahon
  • 7,096
  • 3
  • 30
  • 42
  • Thank you very much! I also found this post (http://stackoverflow.com/questions/5515000/choosing-which-ip-the-http-request-is-using-when-having-multiple-ips-net) which also helped. Thanks again! – Andres Dec 04 '11 at 23:02