Welcome to Implementing Custom Role Security in ASP.NET 1.x Part 2. In this second and final part of this tutorial we will build upon the code and framework developed in Implementing Custom Role Security in ASP.NET 1.x Part 1 and finish off the sample applications requirements.
During Implementing Custom Role Security in ASP.NET 1.x Part 1 we began implementation of a sample application that was designed to create a permissions “aware” custom button control. The purpose of the application is to allow a user to log into an application and have that user’s Role dynamically bound to their user security principal, thus giving a custom button control access to that role and determining if the user is authorized to access its functions.
By creating a separate project of type Web Custom Control Library we added the ability to create a separate assembly to contain the custom button, which can then be used as a reference within our sample web application and also within any other project, allowing for greater code-reuse. It also allows you to create a linkage within the Visual Studio Toolbox for drag/drop operation in the Visual Designer for Webforms.