Binding a new SoapClient to a specific IP address

2019-04-10 06:06发布

问题:

Let's say a machine where the application sits on has SoapClient (to be specific, I'm using Microsoft.Web.Service3.Messaging.SoapClient). It communicates toward a remote location with no problem by sending outgoing requests and getting SoapEnvelope in return (well-established process).

The above scenario is through the IP assigned to the machine where the application is sitting on.

Now, I need to modify this process - we need to add 2 more IPs to the machine, and I need to "bind" outgoing requests to a specific IP, rather than the default IP.

So, at the remote location, it appears as if it is receiving requests from 3 different IPs, but really all from same machine/application.

How do I bind outgoing requests to a specific IP? This is how the remote location "locks down" to a particular account, via an IP, not a login (which was what I suggested, and they declined). They said we should be able to do this (binding to a specific IP), but I'm not sure how to do this with Microsoft's SoapClient object.

Any suggestions?

回答1:

Looking through the MSDN documentation there isn't any means of binding it to a specific ip address on the machine.