473,396 Members | 1,866 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Best practice for limiting login to app?

I have a Win app wherein users login via my interface (i.e. not via NT
Authentication). Since the User Names are like "Driver 1, Driver 2, etc.,
sometimes Driver 1 might accidentally login as Driver 2. There's also a
Truck selection where drivers are supposed to select the truck that they're
actually in (but sometimes they screw up).

My main concern is not allowinging the same user name or truck number to be
used by more than one driver. I could put a bit column "IsLoggedIn" in
tblUser and tblTruck, but unless they specifically click a "logout" button
to reset, I don't know how I can maintain that setting correctly.

Any ideas, best practices, or other?

Thanks,
Ron
Aug 11 '06 #1
2 1084
"Ronald S. Cook" <rc***@westinis.comwrote in news:OHrbMKWvGHA.1284
@TK2MSFTNGP05.phx.gbl:
Any ideas, best practices, or other?

I assume you are worried if they exit the program without logging out...
solution would be to Log them out when you exit the program, and not worry
about forcing them to click a 'Log Out' button.

-mdb
Aug 11 '06 #2
s
I assume you are worried if they exit the program without logging out...
solution would be to Log them out when you exit the program, and not worry
about forcing them to click a 'Log Out' button.

Come on...
What if machine got restarted? Or application got freezed?
The only way I see is to make a timestamp column ( sort of a lock ) in
database which would be updated after some time [ app would do it EVEN
if
the user is non active ] , e.g. 15 or 30 seconds. If application or
machine
get freezed or restarted, next user which will try to log in , will
make the
application check for the timestamp. If it will be older than last
possible
time of update, it would mean that the user CAN log in. Of course, if
application get closed normally, it should remove lock.
Question remains: how to get a representative time... I guess the best
place
is database server - both timestamp and time to check up to should be
taken
from that machine...
cheers!
SlawekG

Aug 15 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

35
by: Swartz | last post by:
Hi all. I'm working here on a small project of mine. I'm not new to programming, but I'm new to PHP. You have to understand that I'm coming from C++, OOP world, so my code might seems a little...
0
by: n33470 | last post by:
In a desktop application, is there a best practice to implement a check at login time to ensure that the number of active users has not exceeded a limit? In our application, we intend to sell...
136
by: Matt Kruse | last post by:
http://www.JavascriptToolbox.com/bestpractices/ I started writing this up as a guide for some people who were looking for general tips on how to do things the 'right way' with Javascript. Their...
4
by: Erich | last post by:
Hello I'm just wondering wich might be the best practice for realizing a login system. At the moment im having a object of self written type 'user' wich carrys user data like name, email and...
1
by: MichaelG | last post by:
I have a web service that talks to SQL Server 2005. At present the WS uses an SQL Server login and password to connect. Is this best practice or should I be running the WS under a domain account...
4
by: Ned Balzer | last post by:
Hi all, I am pretty new to asp.net; I've done lots of classic asp, but am just beginning to get my mind wrapped around .net. What I'd like to do is include some code that tests if a user is...
4
by: =?Utf-8?B?Sm9l?= | last post by:
I am working on a web app that required authentication to AD. The authentication is working fine the way I am doing it, but was wondering what the best practice is. My code doesn't actually...
9
by: =?Utf-8?B?QW1tZXI=?= | last post by:
I've read many incomplete opinions about the "Best Practice" for securely accessing SQL but what I really need to find the "Best Practice" that fits my applications needs. Currently (alpha...
1
by: dharmbhav | last post by:
Hi, I am designing a login mechanism for a website. Presently, I am blocking the user account for 1 hour if there are 3 failed login attempts with-in 1 hour. However, I want to know if there is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.