Hi,
Asim Qazi wrote:
Hi All
i want to get the IP address of the client (calling application) in the
WebMethod of my Webservice,
in ASP i used to get this by this command
"Request.ServerVariables["REMOTE_ADDR"].ToString()"
HttpContext.Current.Request contains the HttpRequest instance, with all
details about the current request.
http://msdn2.microsoft.com/en-us/lib...t_members.aspx
I think that what you want is
HttpContext.Current.Request.UserHostAddress
Note that you have no guarantee that this is the IP address of the end
client, since there might be proxies in between.
HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering:
http://www.galasoft-LB.ch
Private/Malaysia:
http://mypage.bluewin.ch/lbugnion
Support children in Calcutta:
http://www.calcutta-espoir.ch