views:

54

answers:

2

I am developing a WPF application that will hook into a SQLLite database and I have a number of reservations around multiple users:

  1. When I install my application should I assume that each windows user account will mean only one user of my application or should I include a login for my app (drawback is that the user will have to log in all the time)
  2. If I am supporting multiple users how do I handle a new user account i.e. on application start of the new account should I set up a new user in the DB
  3. Are there any other gotchas around this area, it isn't something I have really had to worry about before.

Thanks in advance,

B

+1  A: 

In general

Use the user's Windows identity found on the current thread - it should be supplied to you by the runtime, to tell who the Windows user is. You can use the domain/username as a key in the database to associate user-specific data.

When installing, it will depend on the option of the app being used for the current user only, or for anyone.

If multiple users might use the same Windows account (i.e. guest account) then provide a login control specific to your app, but provide an option to enable it if need be, maybe a question during installation that can also be reconfigured later.

If it's just preferences and such (no personal data) then you can likely get away without requiring a password and this will make the "login" experience a bit more unobtrusive.

John K
Thanks JDK this is great insight any more tips would really be appreciated.
Burt
+1  A: 

1.) You can store the nt_user in your database and check against it, sou you ensure that every windows user has a user in your system

2.) on start you can create a new user, or write a small administration app for this

Patrick Säuerl