Good afternoon, gentlemen. I have a web application in asp.net mvc + angularjs that has a contact form. I would like to know what the user ip and hostname of him that is filling this information, I can do this in javascrip or asp.net?
Good afternoon, gentlemen. I have a web application in asp.net mvc + angularjs that has a contact form. I would like to know what the user ip and hostname of him that is filling this information, I can do this in javascrip or asp.net?
You can use something like:
var ip = Request.UserHostAddress;
var hostName = Request.UserHostName;
Remembering that Request
you can get multiple values, such as Cookies , UserAgent , among many other data.