Get IP Address of Originating Website From a Webservice
The following code was used in a .Net 3.5 web service to retrieve the IP Address of the website consuming it.
This solution may initially escape you since it might seem like the web service should run within an HTTP Context and thus utilize this object to get information from websites calling particular methods.
See MSDN reference(s) for more information.
RemoteEndpointMessageProperty clientEndpoint = OperationContext.Current.IncomingMessageProperties[RemoteEndpointMessageProperty.Name] as RemoteEndpointMessageProperty; clientEndpoint.Address