What we want to do is very simple
We have a check-in kiosk website (C# ASP.NET MVC), and we are trying to set up 30 kiosk stations at each building (each building is about 200 ft away from each other). Every time a person checks in at a building, we want to collect the time and the location of the check-in. (e.g. Person-A checked in at 10:00AM at Building-B).
What I'd like to know is
The most reliable way to detect/find the location given the background below:
- the check-in system itself is a web application
- all the 30 devices are in one OU
- each device has a unique machine name
Method 1 : Get the domain name with Reverse DNS
Since each device has a unique machine name, I'm currently getting the host name using reverse DNS. The code used here is
string IP = Request.UserHostName;
IPAddress myIP = IPAddress.Parse(IP);
IPHostEntry GetIPHost = Dns.GetHostEntry(myIP);
List<string> deviceName = GetIPHost.HostName.ToString().Split('.').ToList();
This method is working for most cases, but we are aware that this method is not always reliable. We do have one case where the retrieved deviceName
doesn't match the actual device name.
Method 2 : Each device specifies the location in URL
This can work. The website can take the LocationID via URL (e.g. https://sample.com/1, https://sample.com/2) and save the ID in a session or cookie. The only slight issue is that the device team will have to physically work with the device to set up each device for each URL, which I don't think is a big problem because the location won't change so often. The initial work is a bit of work for the device team because all the devices are under the same OU.
Method 3: Each device stores the location in cookie
This is similar to Method 2, and it will work. Again, the only slight issues is the initial work and the maintenance work (e.g. cookie got wiped, etc) by the device team.
Method 4: Find the actual location (i.e. latitude and longitude)
I haven't tried this yet but I should be able to use GoogleMap Geolocation to find the current location of each device, and figure out the check-in building based on the location. Unless there are some obvious issues that I'm missing, this may be more reliable and would not require any initial/maintenance work to the device team??
Which one would be a better method or are there any other methods that I should explore?