Click here to Skip to main content
13,448,729 members (53,178 online)
Rate this:
Please Sign up or sign in to vote.
See more:
friends i want to get total no. of unique visits .
one logic is that ---
fetch the ip address and check from data base if its not available then increment the counter
otherwise not.
But it would take much time and make the site slow.Is it feasible?

is there any other method to do this.
pls suggest me

thanx in advance...
Posted 15-Feb-13 1:14am
Zoltán Zörgő 15-Feb-13 7:16am
Are you in an intranet? Are the IP addresses fixed?
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Reading the IP is very quick: Request.UserHostAddress will give it too you immediately. The SQL check should not be long in human terms either - it's just a simple query:
and can be executed as a ExecuteScalar to return just the value. 0 means it's not in there.

So why should it be slow?
However, you should be aware that all users on teh same internet connection will have the same IP address - so all users from the same company will probably match.
Marcus Kramer 15-Feb-13 11:02am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Hi ,

you need to do a bit with global.asx,please go with the below link :[^]

hope it ll solve your issue.

Neha Sharma
maan_k 15-Feb-13 7:39am
thanx.,but i need the total no. of unique visits.I visited above link, here the code written is for total no. of will increment the counter in both cases whether the user is visited earlier or not.
nehas1jan 15-Feb-13 7:45am

Then go with these links ll defenatly solve the issues :

All the Best!

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web01-2016 | 2.8.180318.3 | Last Updated 15 Feb 2013
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100