I am using a windows form application where a login form (login prompt) is used to authenticate an user and then open the application. Let us assume that I have a default admin username and password for logging in. When I click the close button of the application or choose File–> Exit, I want logout to be implemented so that the user has to again log in using his credentials when he starts the application for the next time. I want this to take place using C#
Any help on this guys?
Normally,if you close the application its credientials will automatically go off. The application will start from stratch the next time you start.
In the scenario where the login session is carried over, do your logout tasks on
FormClosingEvent orFormClosedEvent; when the form is closed, the session will not carry over.