I’m wondering how people are doing URL based role authorization in an ASP.NET 2.0 app when using Forms based authentication. I need to do checks as the page loads to verify that the user has rights to it. For instance, a user would need to be in role=’Admin’ to get access to ‘siteAdmin.aspx’ while a user would need to be in role=’User’ or role=’Admin’ to get rights to default.aspx.
Seems like there are a few options including:
The final option seems the cleanest since I don’t have to have authorization rules in the pages and can rely on CSLA but that also means I need a CSLA business object to base each page on although I guess more than likely I would otherwise what would I need authorization for.
Just wondering what other people are doing. Thanks for the help.
I use #2 above. I put it at the top of each page that requires authorization. Some do not require any so I just omit it. Pretty simple - but it works.
Joe
Copyright (c) Marimer LLC