ASP.NET Get Client IP

To get User IP Address in ASP.NET:

HttpContext.Current.Request.UserHostAddress;

OR use Request if used inside ASP Page inherited from Page class

Request.UserHostAddress;

Comments

Popular posts from this blog

OCR text detection with google APIs C#

The specified version string contains wildcards, which are not compatible with determinism.

How to set dynamically height/width of an external image in rdlc report?