开发者

How can you tell if an an ASP.NET request is remote or from localhost?

开发者 https://www.devze.com 2023-01-01 10:57 出处:网络
How can you programmaticall开发者_Python百科y determine if an an ASP.NET request is remote or from the localhost?I found it: HttpContext.Current.Request.IsLocalYou can check the Request.UserHostAddres

How can you programmaticall开发者_Python百科y determine if an an ASP.NET request is remote or from the localhost?


I found it: HttpContext.Current.Request.IsLocal


You can check the Request.UserHostAddress property.


yes HttpContext.Current.Request.IsLocal will must works. I am also using it in one of my project and working fine.

0

精彩评论

暂无评论...
验证码 换一张
取 消