I have a web app using custom membership providers to access admin and inventory pages, each in a separate folder for different users from different database tables (hence the custom membership providers).
There are other pages in the root and other folders which are for guest visitors.
I have a login form for the admin and the inventory sections in the root which calls the appropriate membership provider for authentication and redirects to the corresponding page upon successfuly login.
Since I can have 1 authentication form entry in the web config, how can I set up the app to send to the correct login form? (like an httpApplication.Authorize event)
My first thought was to have an HttpModule that checks the path and if the inventory or admin folders are in the path and the user is not authenticated then redirect the user to the login page.
Is that the best approach? Is there another way?
Thank you