Wednesday, January 11, 2017

How to get IPAddress,Browser name and Browser Version

 var ipAddress = Request.ServerVariables["remote_addr"];  //for getting IPAddress of the User 
var userAgent = string.Format("Browser ({0}) : {1}", Request.Browser.Browser, Request.Headers["User-Agent"]);  ///will get browser name and browser version

 var hostName= Dns.GetHostEntry("ip").HostName; // will get computer name of the user 

No comments:

Post a Comment



Custom Search
Protected by Copyscape Plagiarism Software