How do I get the caller's IP address in a WebMethod?
[WebMethod] public void Foo() { // HttpRequest... ? - Not giving me any options through intellisense... }
using C# and ASP.NET
HttpContext.Current.Request.UserHostAddress is what you want.
1.4m articles
1.4m replys
5 comments
57.0k users