Who is calling my WEB SERVICE ?

  • Thread starter Thread starter Shailendra Batham
  • Start date 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
 
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.
 
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
 
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
 
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
 
Back
Top