-3

We have a staff attendance system. It's written in asp classic with MS ACCESS database where its store users info and their login time.

I want to add one more extra thing, where I can see the users workstation IP address from where they login.

We believe that some one is logging in for some one else even they are not in office.

How to get the workstation IP address?

we have around 25 client in a user network. when ever they reach the office the have to login to LoginStaff Attendance System, Attendance login page

when ever the user login its write in MS Access database as below.Staff Attendance Database

we think someone is attending attendance for someone before he even arrive into office to show he was on Time

  • 1
    Possible duplicate of [How to get the public IP address of a user in C#](http://stackoverflow.com/questions/19285957/how-to-get-the-public-ip-address-of-a-user-in-c-sharp) – Umair Farooq Aug 18 '16 at 10:02
  • Please see this question : http://stackoverflow.com/questions/19285957/how-to-get-the-public-ip-address-of-a-user-in-c-sharp – NewbieProgrammer Aug 18 '16 at 10:02
  • Dear im noob in this thing and i don`t know how it works. i have MS ACCESS database linked to this system where the worker check in time recorded, i want to add a extra filed to get the each user IP, maybe 2 workers login from same machine – Zain Ul Abideen Aug 18 '16 at 10:11
  • 1
    You're asking your question with tags c# and asp.net, but your screenshot clearly shows an .asp extension. Is it possible you're working with asp-classic and vbscript? Then you might consider duplicate question http://stackoverflow.com/questions/21131587/how-to-define-the-ip-address-using-classic-asp – Niels V Aug 18 '16 at 10:21
  • Dear as i said im noob in this thing i don`t know where to put the codes and how it will be write in Access – Zain Ul Abideen Aug 18 '16 at 10:35
  • you could get even real IP address, if user using some proxy server which are completly hide real IP address – Zam Aug 29 '16 at 12:33

2 Answers2

2

You can use

Request.ServerVariables("REMOTE_ADDR")

To get the remote ip address

Lars Meldgård
  • 1,074
  • 10
  • 6
0

If the site is CloudFront'ed, you have to use Request.ServerVariables("LOCAL_ADDR") instead ...

den232
  • 131
  • 1
  • 9