views:

25

answers:

1

Hi guys,

From within a webmethod (.net asmx file) - is it possible to determine from where the call to the webmethod came?

Thank you

+1  A: 

You have this :

httpContext.Current.Request.UserHostAddress

MSDN

To get this host IP adress. but if by where you mean a place, , you can't.

remi bourgarel
Well, you could if you call a GeoIP WebService with the desired IP, and then that would convert it to the actual place of the call (see Proxy, ISP or Host Locations)
jpabluz
cool this should work, the HttpContext.Current.Request.UrlReferrer is what I was looking for.
Daniel Brink