Who is calling my WEB SERVICE ?

  • Thread starter Shailendra Batham
  • Start date
S

Shailendra Batham

hi all
I have a few web services, I want to find out when a particular web service
is called........ is it possible in my web service to find the IP address or
details of the computer who is calling my web service.

Thanks, help is appreciated.
shailendra batham
 
E

Eric Cherng

You will need to add custom code in your Web services to log these details.
Check the HttpRequest class to see some of the details you can log.
 
J

John Bailo

Shailendra said:
hi all
I have a few web services, I want to find out when a particular web
service is called........ is it possible in my web service to find the IP
address or details of the computer who is calling my web service.

Thanks, help is appreciated.
shailendra batham

just look at the iis logs
 
S

Shailendra Batham

hey eric I tried this and this is the output I get from my local machine and from other machines, why can't I get the REAL IP ADDRESS of the machine calling my web service.

HttpContext.Current.Request.ServerVariables("REMOTE_ADDR")

<REMOTE_ADDR>127.0.0.1</REMOTE_ADDR>

Any ideas or suggestions as to how I can get the IP ADDRESS

thanks,
shailendra batham
 
R

Richard Blewett [DevelopMentor]

Are you calling the web service from your own machine? If so I'm not surprised you are seeing the loopback address. Also even with REMOTE_ADDR you may get the IP address of a proxy server and not the original client

Regards

Richard Blewett - DevelopMentor
http://staff..develop.com/richardb/weblog

nntp://news.microsoft.com/microsoft.public.dotnet.languages.csharp/<#[email protected]>

hey eric I tried this and this is the output I get from my local machine and from other machines, why can't I get the REAL IP ADDRESS of the machine calling my web service. HttpContext.Current.Request.ServerVariables("REMOTE_ADDR") <REMOTE_ADDR>127.0.0.1</REMOTE_ADDR> Any ideas or suggestions as to how I can get the IP ADDRESS thanks, shailendra batham
 

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,996
Messages
2,570,238
Members
46,826
Latest member
robinsontor

Latest Threads

Top