C# Login Dialog Implementation

Posted by arc1880 on Stack Overflow See other posts from Stack Overflow or by arc1880
Published on 2010-04-10T19:04:45Z Indexed on 2010/04/10 19:13 UTC
Read the original article Hit count: 358

Filed under:
|

I have implemented a LoginAccess class that prompts the user to enter their active directory username and password. Then I save the login data as an encrypted file. Every subsequent start of the application, the LoginAccess class will read the encrypted file and check against the active directory to see if the login information is still valid. If it is not, then it will prompt the user again. I have made it so that the reading of the encrypted file and displaying of the login dialog is done on a separate thread. A delegate is fired when the login process is complete.

The issue that I'm having is that I have a class that is used in multiple places. This class contains the call to the LoginAccess object. Every time I instantiate a new object there are multiple calls to the LoginAccess object and I get multiple dialogs appearing when it tries to prompt for a username and password.

Any suggestions on how to have only one dialog appear would be greatly appreciated.

© Stack Overflow or respective owner

Related posts about c#

Related posts about login