How to detect access control machine in or out? - c#

I have different types of access machines like fingerprint scanner, card scanner, etc. These machines generate a data when used like card_no:punch_time.
I am developing an app in C#.NET to manage these access. Employees scan their cards while in and out. They have 3 or more different working shifts. But I have a problem with how do I detect if they are entering or leaving without using any hardware?
Can anybody help me?

For your Without using any hardware situation, one way is to develop a web-based Attendance management application, make it accessible from a LAN enabled PC, it will just provide GUI for entering their credentials and will store the information in a database present at some other PC, employees will have to Sign-in at the start of their shifts and will have to Sign-out while leaving the office.

Related

Is it possible to defend my program whilst offline?

I need to find a way to block user access to my database that will be installed in his pc.
So, here on the company we have a problem. We need to block user access to our database that will be installed on their pc, what I mean by this is...
We have 2 softwares. A web App ERP and an instalable finances App.
We reached the conclusion that it was unnecessary to have 2 standalone apps, and that we should put the finances app inside our ERP.
But this comes with a problem, theres a big part of our users that don't trust the web, and web apps, they think that what is on their pc is what is
safe, and is where it should be.
We don't want to maintain the 2 standalone softwares needlessly.
We asked our users if they'd be happy with a progressive web app, their answer was the same.
Then we tried to make a way to run our ERP on their pc whilst offline, as an executable, but that comes with a lot of troubles, we need to install IIS, PostgreSQL, .net frameworks, pgadmin, our metadata database (which it shouldn't be accessible in any way shape or form by the user!), etc... that lets our app run on the users pc.
Of course we don't want to do that, but we got no choice left. We need to at least block our metadata database from being accessed, since the whole structure of the web app is there and we don't want to share it with the competition
Our solution was installing all that was needed inside a virtual drive and run the app from there. but all the files and databases are available to the user for him to mess with.
How can we restrict acess to that virtual drive the best possible, and protect our intelligence property? is it even feasable? I've run out of ideas and don't know what else to do, so any help is welcome.
Should I take another route or is it a lost cause?
Whoever has control of the database machine has control of the database. So if the database is running on the client's machine, there is no way to keep an administrative user out of the database.
So if the users don't trust a web application, they will have to trust their system administrators (or themselves, if they have administrator rights to their machines).

Display Notifications across a network in C#

We have a local network and a program running on each machine which communicates with a database.
I wanted to display notifications (like BalloonTip) across the network to every computer whenever something is changed in the database.
Because everyone is using the same operating system (Windows 10) I could use built in notification controls.
I wanted to do this programmatically in C#.
Do you guys have any ideas how to send a message from one computer to every single one in the network?

send data from a C# asp.net web site to an installed C# windows forms app

I'm working on a net based POS system and need to enable silent printing.
(Print without displaying the PrintDialog).
I have managed to get it working but at times when cashiers want to generate new vouchers it does not print and this is becoming a problem.
I have been instructed to create a Windows Forms app that will be installed on all of my cashiers machines, what this app needs to do is once the cashiers log onto the website and sells a voucher i need data to be sent from my ASP.NET website to the Windows form application where the silent print can take place, so as soon as the cashiers clicks on the 'Sell Voucher' button the data must be sent to the installed windows app and print automatically.
The data that will be sent to the cashiers machines is basic info like Cashier Name, Account Name, Site...etc
How would i go about achieving this result?
Thank you in advance.
The two apps will probably need to share a single data source (e.g. using SQL Server).
If the printing needs to happen silently, without user intervention, then you will need to implement a listener (typically as a Windows Service) that waits for new items to be added and are ready to print.
See: Publish-subscribe pattern or, alternatively, Observer Pattern.
Look into WCF or signalr.net
for signalR there is a .net client for easy implementation into a windows app

Limit login to web app to some specific devices

I have created a Labor/Time Keeping application that is used for the Construction industry, and it consists of a WinForms Client where employees actually clock in and out, a WCF web service that fields the clock in and out events and provides data to the clients, and a back-end WinForms piece for Configuration, Administration and Reporting. This is all .NET with C#.
I'm looking to also write an ASP.NET Web Client to make it more flexible, with the intent that this will be used from tablets and/or cell phones from the field.
So, now that the background is out of the way, here's a requirement that I'm trying to figure out the best way to accomplish.
I don't want employees to be able to just clock in and out from their house, or from their personal phones; they should be clocking in/out with a company owned device that the Foreman keeps in his truck for that specific purpose. At the same time, I want logging in to the web app to be as simple as entering a 4 digit pin number and clicking either Clock IN or Clock OUT (no offense to the construction industy's employees, but there are some who literally have trouble trying to type in a username and password on a mobile device).
What is the best way to limit access to this web client to some specific set authorized of devices? I've considered trying to MAC Address filter, and I read about using client certificates to limit which devices could access the web service, but is there any better way? I mean, couldn't a client certificate just be copied to someone's personal phone if you get that rare concrete finisher who happens to be a nerd and know how to get it off of the company's device?
Is there any other way from a web app that you can uniquely identify a device and match it up with a list of authorized devices?
In ASP.net you can't take the MAC address of client's network adapter. Because of that, you can not count on defining a white list of MAC addresses for 'valid' devices. But you can use some other tricks alternatively:
1- You can find out the IP address of your client devices and limit them if they are not authorized from your side.
2- You can Also detect OS, computer name and browser name and screen resolution and you may utilize them in this case.
3- You can keep a flag of how many cookies have you been set for a specific user and control in this way.
4- You may use Windows authentication to prevent your users from a form-based authentication (of course if your network is active directory based)

Searching another WP7 device in same network

I am working on a application in WP7 in which if the application is running on one WP7 device, it should search for another WP7 device having the same application installed in close proximity, or lets say if they are in the same network.
How it can be done ?
Thanks in advance
I can think of two solutions to this problem. Either build a backend service which saves the location of the users, and use this data to show if a user is nearby. This would then not require the users to be on the same network, but requires you to have backend service. (And store user location data, which not all users are comfortable with).
The other solution, which might be better in your case is to use broadcasting in a UDP Unicast group. This would limit it to users on the same network though. There is a nice tutorial of this over at MSDN.

Categories