I have an ASP.Net 4.0 application, published on a company intranet network on an IIS 7.0 server, and I want to save the client\'s IP address in my database. So I want to get
You could use the UserHostAddress and UserHostName properties on the Request object:
Request
string ip = Request.UserHostAddress; string hostname = Request.UserHostName;