How can we get client' IP in web service

R

Richard Blewett [DevelopMentor]

ad said:
Hi,
When client connect to a WebService, how can we get the client's IP?

You can't for certain, if the client has come through a proxy/router/NAT
then you will get the IP address of the machine they came via. You can get
the client or their intermediary via the

System.Web.HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];

property

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top