.net - How to send SOAP request from a specific IP address with Service Reference -


Text after "

Our machine has multiple IP addresses and the server only accepts requests from a specific IP address. I am looking for a way to send a SOAP request from a specific IP address.

This question is for an extension, but it has been done for web context, I am using a service reference.

I am using Visual Studio 2013, this proxy sections are generated from WSDL and as it uses WCF / it seems to send the request

the customer's The generated proxy class looks like this:.

  & lt; System.Diagnostics.DebuggerStepThroughAttribute (), _ System.CodeDom.Compiler.GeneratedCodeAttribute ("System.ServiceModel", "4.0.0.0") & gt; _ Partial Public Class Implements Consoto.TestActivitySoap Public Sub New (the System.ServiceModel.ClientBase (Consoto.TestActivitySoap got TestActivitySoapClient heritage)) MyBase.New () End Sub Public Sub New (ByVal endpointConfigurationName as string) MyBase.New ( endpointConfigurationName) end sub public all new (ByVal endpointConfigurationName as string, reward Atader as string) MyBase.New (endpoint Configreshnnam, remote address) end sub public sub new end sub public sub new (ByVal System.ServiceModel.Channels. Binding, ByVal remoteAddre Ss System.ServiceModel.EndpointAddress as binding as) MyBase.New (Bandhan, remoteAddress) End Sub & LT; System.ComponentModel.EditorBrowsableAttribute (System.ComponentModel.EditorBrowsableState. Advanced) & gt; _ Function Consoto_TestActivitySoap_TestActivity (ConsoloTestActivityRequest as requested) Consoto.TestActivityServiceResponse Implements as Consoto.TestActivitySoap.TestActivity Returns MyBase.Channel.TestActivity (Request) End Function Public Function Test Login (ByVal TestActivity1 Consoto.TestActivity as Consoto In form of). ConsetTestActivityResponse Dim inValue as Consoto.TestActivityRequest = New Consoto.TestActivityRequest () value in. As Test activity = Prikshnaktivti 1 DM retvl Consoto.TestActivityServiceResponse = CType (m, Consoto.TestActivitySoap) .txt activity (inValue) returns retVal.TestActivityResponse and Function & amp ;; System.ComonentModel.EditorBrowsableAttribute (SystemComponentModel.EditorBrowsableState.Advanced) & gt; _ Function Consoto_TestActivitySoap_TestActivityAsync (ByVal request as Consoto.TestActivityRequest) In the form of System.Threading.Tasks.Task (Consoto.TestActivityServiceResponse) Implements Consoto.TestActivitySoap.TestActivityAsync Return MyBase.Channel.TestActivityAsync (Request) End Event Public Function TestActivityAsync (ByVal TestActivity Consoto as .test activity as a system. threading. Tasks. Dim InValue as Task (Console's Test Activitivity Service Response) Conosyo. Value in Activism Resistance = New Contato.Tact Activative Revest () Titiaktiviti on = Test Activate Return CType (, Contoto. Titiaktiviti SOAP) Ktast Aktivitisink (Invalu) End Function End Class  

I tried to override CreateChannel of

 < Code> Protected Override Function TestActivitySoap return as the CreateChannel () termination MyBase.CreateChannel () termination function  

but can not understand what I should write

In addition, I could not get a way to override the behavio to specify ur and I'm open to all suggestions in any .NET language. If this is not possible, please suggest alternative method to get it.


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

javascript - amcharts makechart not working -

java - Algorithm negotiation fail SSH in Jenkins -