Hi Johnnie,
Use Request.UserHostAddress to retrieve the IP of the calling client.
Regards,

Signature
Martin Kulov
http://www.codeattest.com
MCAD Charter Member
MCSD.NET Early Achiever
MCSD
> I have created a web service that does some logging to a web database and
> would like to include the client's IP address in the log information. How
[quoted text clipped - 3 lines]
>
> -Johnnie
Johnnie Norsworthy - 12 Feb 2005 22:19 GMT
> Hi Johnnie,
>
> Use Request.UserHostAddress to retrieve the IP of the calling client.
Martin,
Thank you for responding. One more thing please...
How should I create the System.Web.HttpRequest for Request.UserHostAddress
to be valid when my web service is called? My partial code is below.
Thanks,
Johnnie
using System.Web;
HttpRequest request = new HttpRequest( ); // parameters for my web service
to use???
ipAddress = request.UserHostAddress;
Johnnie Norsworthy - 12 Feb 2005 23:37 GMT
I think i have it now; I just do this from within the web method.
ipAddress = this.Context.Request.UserHostAddress;
Testing it now.
-Johnnie