Binding a new SoapClient to a specific IP address before sending outgoing request

人走茶凉 提交于 2019-12-06 05:01:46

问题


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.



来源:https://stackoverflow.com/questions/321788/binding-a-new-soapclient-to-a-specific-ip-address-before-sending-outgoing-reques

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!