I know how to set permissions for certain pages using the built in feature ASP.net has for creating users and setting authorisation in the web.config file. The problem I am having at the moment is that I have been requested to use an MS Access database to store users and user roles and I am not sure how to go about finding out how to set this in the web.config file. Is there away of querying the database in the web.config file to find out users for a specific role? If so how would I go about doing it? The code below is what I would’ve written if I had’ve used the ASP.NET Configuration builder tool.
<location path="admin.aspx">
<system.web>
<authorization>
<allow roles="Admin"/>
<deny users="*"/>
</authorization>
</system.web>
</location>
You should look up the Membership Provider model. There are out of the box providers for Microsoft SQL Server as a backing store, but you can also roll your own using the provided base classes.
Here is a video and some other material that claims to talk about, among other things, creating an Access backing for a custom Membership Provider.