ASP.Net 2.0 Webservice and IP adress

B

Bit Byte

I am writing a little web service - and would like to use the IP adress
of the machine that sent the request (along with other data) as part of
my security checks.

Does anyone know how I may obtain the IP address ?
 
A

Aidy

I am writing a little web service - and would like to use the IP adress of
the machine that sent the request (along with other data) as part of my
security checks.

Does anyone know how I may obtain the IP address ?

Request.ServerVariables ["REMOTE_ADDR"]

To pre-empt your next question, if the user is behind a proxy you get the
proxy address, there is no way to get the client's address.
 

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

Members online

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,230
Latest member
LifeBoostCBD

Latest Threads

Top