views:

35

answers:

1

Greeting,

I have two levels of authentications in ASP.NET application.

I have a Webadmin user that have full access to all the websites and Webuser user that have limited access.

I want to destroy all open sessions before do any new login, no matter who will do the login.

Where should I place my code to destroy all open sessions before I do any new login?

A: 

If you want to guarantee it's done just before the login occurs, handle the login button's Click event to destroy all open session information before performing the authentication check.

To do that you can create a custom Login control, using this article: http://msdn.microsoft.com/en-us/library/aa478962.aspx

David Stratton