Capture IP only once per visit

  • Thread starter Thread starter Mort Strom
  • Start date Start date
M

Mort Strom

My default.aspx page captures client IP and browser values for all users,
then records to a SQL table. I'm finding that there may be several records
inserted per visit because I see 2~3 entries within a minute or so. The
default.aspx page has no post-back or AJAX calls.

How do I ensure that client IP is captured only once per session?
 
re:
!> How do I ensure that client IP is captured only once per session?

Set a session variable ( Session("IP") ).

Then check whether the session variable has been set or not.

If it has been set, don't do the client IP capture.
If it hasn't been set, do the client IP capture.





Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
=========================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top