This project is read-only.

Backend users

Topics: Developer Forum
Jun 14, 2008 at 2:35 PM


Is it only possible to have 1 backend user account?
I tried to add a second user to the web.config but it seems that N2 only accepts the admin account.

<authentication mode="Forms">
    <forms loginUrl="edit/login.aspx" protection="All" timeout="30000" path="/">
        <credentials passwordFormat="Clear">
            <user name="admin" password="pass1" />
            <user name="editor" password="pass2" />


Jun 14, 2008 at 3:46 PM
You can use the membership provider:

    <!-- These membership and role providers store their data as content items. You can also use the forms authentication credentials only (remove these sections) or the default ASP.NET providers (check your ASP.NET documentation) -->
    <membership defaultProvider="ContentMembershipProvider"><providers>
      <add name="ContentMembershipProvider" type="N2.Security.ContentMembershipProvider, N2.Security" />
    <roleManager enabled="true" defaultProvider="ContentRoleProvider"><providers>
      <add name="ContentRoleProvider" type="N2.Security.ContentRoleProvider, N2.Security" />

Jun 14, 2008 at 5:54 PM

Thank you for the quick reply libardo!

I’m trying to figure out how to setup users.
I have 2 types of users:

  1. Backend users, which can login and edit the webpages.
  2. Visitors, which can login at the frontend and view locked webpages.
    These users should not be able to login at the backend.

When using the N2 custom membership provider, all users are able to login at the backend.

Is that correct understood?

Jun 15, 2008 at 12:04 AM
What roles did you assign the registered visitors? Access to the backend is granted by the role "Editors" or "Administrators".
Jun 15, 2008 at 2:04 PM
That explains a lot… problem solved ;)

Thanks for the help!