Adding Role to User Created in Web.config


I have a few users setup in the web.config of an site to handle authentication. Without getting into details I'm not using the full membership/role provider and would rather not have to implement it at the moment do to time constraints. However I do need the ability to assign a role to a user so that securityTrimming works on the sitemaps associated menus.

For now I just have a few users setup in the web.config (i use SHA1 in real config)

<authentication mode="Forms">
    <forms name="Auth" loginUrl="~/login.aspx" defaultUrl="~/admin/default.aspx" requireSSL="true">
        <credentials passwordFormat="Clear">
            <user name="admin" password="test"/>                

Is it possible to also assign a Role to one of the users in the credentials section or elsewhere without setting up an actual role provider? Something similar to how I have the users setup above.

Best Solution

This is not possible to do via the web.config, you will need to setup the membership provider, but using the .exe to create the database tables, the whole process literally takes under 5 minutes to complete!

Related Question