Reputation: 189
The application application I'm currently working on is required to interface with a web service using SOAP. The service providers want to restrict access to the service via a firewall using BOTH an IP address and a Port. I'm using VS 2010 and the service has been added as a .NET 2.0 Web Service.
Right now the firewall rule for my connection's port is set to 'ANY' and the service team wants to tighten it down to a specific port. I can't seem to find any way to set a specific outgoing port (port used when exiting my web server) in my service.
Is it even possible to do this?
Upvotes: 0
Views: 1549
Reputation: 161821
It is possible to do this, but it's a non-trivial customization.
GetWebRequest
method, you can gain access to the HttpWebRequest
instance being used by the request.HttpWebRequest
has a ServicePoint
property.ServicePoint
has a BindIPEndPointDelegate property.Upvotes: 1