get IP address

M

Michael

Hi

This probably is a stupid question, but How would I get client IP address in a web service
I can do that in a normal asp.net webpage without problem ( I use Request.UserHostAddress), but when I try to move the code into the asmx file, it won't compile telling me the type or namespace name "Request" could not be found

what should I do

Thanks in advance

Michael
 
M

Michael Baumann

HttpContext.Current.Request.UserHostAddress

Michael


Michael said:
Hi,

This probably is a stupid question, but How would I get client IP address in a web service?
I can do that in a normal asp.net webpage without problem ( I use
Request.UserHostAddress), but when I try to move the code into the asmx
file, it won't compile telling me the type or namespace name "Request" could
not be found.
 
D

Dino Chiesa [Microsoft]

System.Web.HttpContext.Current.Request


Michael said:
Hi,

This probably is a stupid question, but How would I get client IP address in a web service?
I can do that in a normal asp.net webpage without problem ( I use
Request.UserHostAddress), but when I try to move the code into the asmx
file, it won't compile telling me the type or namespace name "Request" could
not be found.
 

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

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top