.net - How to Specify WebRequest IP to use (or HttpWebRequest if applicable) (C#) -


Is it possible to specify an IP address that should be used when creating a connection to a remote resource? For example, I have an MVC 2 website that runs on the IP 0.0.0.10 but it has been assigned to the server in 0.0.0.1 - 0.0.0.10 . The website contains a class that will be started based on user input and will create a request for remote resources.

The problem I have is that WebRequest is using the most 0.0 as 0.1 as it is the server's first IP instead of the IP, thus the IPS Requesting to block from remote resources filtered by ...

Method of specifying IP should use WebRequest when requesting. Alternatively, this is not the solution of WebRequest, it may be a solution for HttpWebRequest, or something else may be required if I have to, then I will change the code for the requests / reactions.

However, help would be greatly appreciated! thank you in advanced!

I think you want to use HttpWebRequest.ServicePoint to specify a particular IP address Are there. See Use for request, or better yet, it looks like what you really want.


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -