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.
2.1m questions
2.1m answers
60 comments
56.9k users