Click here to Skip to main content
15,909,466 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello sir
i am start working on asp.net web application .now i need some help that ,i want to store ip address of client system where they log in in my web site .for this i am searching code on google but not found.
please help me
Posted

Hi friend,

I am not a ASP.Net guy but I can give you some pointers to move ahead and solve this problem.

Here's the idea.

1. Use the link provided by idle63 in his solution to get user's ip address.

2. There are some complete SQL files available which contains a list of all the IP address and Place relation in a table. You have to download one and create a database and store that table in your database.

3. Now you need to create a simple SELECT query to get the Place of the user based on his IP-Address.

4. Then using your server time, you can get the time of login of that user.

5. Simply store all this data in your database.

6. You can create a simple view also to display these results just like fb when a user wants to look at his recent activities :)

Hope that this answer will give you some ideas to move ahead. Please do rate my answer :)

With Regards
Tushar Srivastava
 
Share this answer
 
Comments
Er. Tushar Srivastava 23-Dec-13 6:03am    
Why does it get down-voted ?
Parijat_Mishra 23-Dec-13 6:17am    
and how to get browser information ??????
Er. Tushar Srivastava 23-Dec-13 6:34am    
Try this : http://www.developerfusion.com/code/3242/how-to-get-information-about-the-current-browser/ :)
Parijat_Mishra 23-Dec-13 6:17am    
thanks 'Tushar Srivastava' sir
There are thousends of results if you google for "asp.net getting client ip"

One of them
http://www.aspsnippets.com/Articles/How-to-get-IP-Address-of-Visitors-Machine-in-ASP.Net.aspx[^]
 
Share this answer
 
Comments
Parijat_Mishra 23-Dec-13 5:51am    
thanks sir

but i see it
i want to show all information as like face book
1. which day you login
2. which place
3. login from computer or other device etc...
[no name] 23-Dec-13 5:56am    
Sorry but in your question you asked how to get the client IP.
Parijat_Mishra 23-Dec-13 6:00am    
sorry for that but i need more info
[no name] 23-Dec-13 6:05am    
I understand.
1.) Login Date: I think not a problem
2.) Which place: You need the help of an internet service. e.g. http://www.geobytes.com/IpLocator.htm
3.) From my point of view no chance to get information like this

Thank you for accepting the answer anyway, even it is not your complete solution.

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