Click here to Skip to main content
15,036,441 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
I want to find IP Address, Machine Name which are submitting data in my site. please give solution for this.
Posted

use
Request.ServerVariables
to get the server details.
see this Link[^]
   
Comments
Wendelius 29-Dec-11 8:46am
   
Good link, my 5
Rajesh Anuhya 29-Dec-11 8:47am
   
Thanks Mika
Try
How To Get IP Address Of A Machine[^]
Finding IP Address Information[^]

C#
string ip = Request.UserHostAddress;
string hostname = Request.UserHostName;

Reference Link :-
HttpRequest.UserHostAddress Property [^]
HttpRequest.UserHostName Property [^]
   
Comments
Wendelius 29-Dec-11 8:38am
   
For some reason this has been a 'hot' topic in Tip/Trick lately, 5'ed.
For IP Address
Request.ServerVariables["REMOTE_ADDR"].ToString()

For Machine Name
Request.ServerVariables["AUTH_USER"].ToString()
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900