ASP.NET asmx获取客户端ip, 请求ip, WebService中如何获取客户端的ip
ASP.NET asmx获取客户端ip, 请求ip, WebService中如何获取客户端的ipthis.Context.Request.UserHostAddress.ToString();using System.Web.Services;namespace WeChatPortal.WebService
{
/// <summary>
/// Summary description for WebService1
/// </summary>
public class WebService1 : System.Web.Services.WebService
{
public string HelloWorld()
{
return this.Context.Request.UserHostAddress.ToString();
}
}
}来源:C#社区
网址:www.hicsharp.com
强烈支持楼主ing…… 激动人心,无法言表!
原来还有这种操作,长见识了! 说得对!狠狠赞同,没毛病~ 赞同 + 10086,没毛病,完全没毛病 浅蹲一个后续,楼主更新踢我一下 水个经验,支持楼主,加油呀 笑不活了,评论区比正文还精彩! 路过混个脸熟,顺便为优质内容打 call~