+1-888-365-2779
Try Now
More in this section

Forums / Set-up & Installation / Multiple Instance - One application - multiple users

Multiple Instance - One application - multiple users

8 posts, 0 answered
  1. Vijaianand
    Vijaianand avatar
    94 posts
    Registered:
    09 Jul 2012
    16 Oct 2008
    Link to this post
    I know we can install multiple instances to point to one database. One application  can point to the same database. But I am having problem distinguishing users. Can I have seperate users for both instances? Since the database is shared, I think you can't create different admin.

    How do we tackle this problem? i need admin for both instances but one should have less privilege than other admin.

    Help needed. I already placed a ticket and no response for 2 days.
  2. Joe
    Joe avatar
    138 posts
    Registered:
    24 Sep 2012
    16 Oct 2008
    Link to this post
    Hi VIJAIANAND,

    Thanks for contacting us.

    The best way to do this is to create another role called admin and give it rights, since Admin will always have unrestricted privileges. Other than that, you could create two separate groups of roles by adding more providers using the following code:

    <roleManager enabled="true" cacheRolesInCookie="true" defaultProvider="Sitefinity"
                <providers> 
                    <clear/> 
                    <add connectionStringName="DefaultConnection" applicationName="/" name="Sitefinity" type="Telerik.DataAccess.AspnetProviders.TelerikRoleProvider, Telerik.DataAccess"/> 
                    <add connectionStringName="DefaultConnection" applicationName="/2" name="Sitefinity2" type="Telerik.DataAccess.AspnetProviders.TelerikRoleProvider, Telerik.DataAccess"/> 
                </providers> 
            </roleManager> 
            <membership defaultProvider="Sitefinity" userIsOnlineTimeWindow="15" hashAlgorithmType=""
                <providers> 
                    <clear/> 
                    <add name="Sitefinity" connectionStringName="DefaultConnection" type="Telerik.DataAccess.AspnetProviders.TelerikMembershipProvider, Telerik.DataAccess" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" applicationName="/" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" passwordAttemptWindow="10" passwordStrengthRegularExpression="" minRequiredPasswordLength="1" minRequiredNonalphanumericCharacters="0"/> 
                    <add name="Sitefinity2" connectionStringName="DefaultConnection" type="Telerik.DataAccess.AspnetProviders.TelerikMembershipProvider, Telerik.DataAccess" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" applicationName="/2" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" passwordAttemptWindow="10" passwordStrengthRegularExpression="" minRequiredPasswordLength="1" minRequiredNonalphanumericCharacters="0"/> 
                </providers> 
            </membership> 
            <profile defaultProvider="Sitefinity"
                <providers> 
                    <clear/> 
                    <add name="Sitefinity" connectionStringName="DefaultConnection" applicationName="/" type="Telerik.DataAccess.AspnetProviders.TelerikProfileProvider, Telerik.DataAccess"/> 
                    <add name="Sitefinity2" connectionStringName="DefaultConnection" applicationName="/2" type="Telerik.DataAccess.AspnetProviders.TelerikProfileProvider, Telerik.DataAccess"/> 
                </providers> 
                <properties> 
                    <add name="FirstName"/> 
                    <add name="LastName"/> 
                </properties> 
            </profile> 

    Please notice the Sitefinity2 lines that say add name. Notice the application name property is also different that the application name property of the name above. When you go to Administration > Users, you will notice a drop down list. Select Sitefinity2 and you'll notice no users or roles appear. You can use this section to create all of your new users and roles. For more info on providers, please read Working with Providers in our User Manual.

    I hope that this provides a solution to your technical issue. Please let us know if you need further assistance.

    Best wishes,
    Joe
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. Vijaianand
    Vijaianand avatar
    94 posts
    Registered:
    09 Jul 2012
    16 Oct 2008
    Link to this post
    Hi Joe,

    Thank you for the reply.

    I was able to create a different role as administrator2 with limited option but I can't create the same user "admin" since its already exists. The idea behind is, public server instance admin user should only haev limited access whereas the internal server instance admin user should haev all access.

    Since it shares the same db, it looks like user can't share the same username. I thought it can be done using the other method. I created the new role in the sitefinity2 and user admin but I couldn;'t able to assign any permission for the new role created in sitefinity2. Because it showing the sitefinity roles not sitefinity2 roles. How come?? Also How do you connect a particular instance to use a provider so only those users are available for that instance?

    Also the usermanual doesn't have a section explaining the "working with providers."

    Please help to accomplish the need. As I said, we need to server instances to use to seperate admin level users. One internal admin should have all access whereas the other one with limited access.Also I know user logging and everything is done thru admin user right.. How do you make this limited access user to do logging and stuff..

    Please Help. If I am confusing, let me know or please clarify.
  4. Joe
    Joe avatar
    138 posts
    Registered:
    24 Sep 2012
    20 Oct 2008
    Link to this post
    Hello VIJAIANAND,

    Thanks for contacting us.

    By default, administrators have unrestricted privileges and one user is placed in that role by default. You are unable to adjust privileges on this role because Sitefinity needs one role and a user in it to function properly. You will need to just create another admin role, with a name different from administrators, and add users to it. Here is the provider to demonstrate this functionality of an admin having unrestricted privileges:


    <security defaultProvider="DefaultSecurityProvider" cmsProvidersName="Sitefinity"
                <roles> 
                    <clear/> 
                    <add name="Administrators" permission="Unrestricted"/> 
                    <add name="PublicUsers" permission="None"/> 
                </roles> 
                <providers> 
                    <clear/> 
                    <add name="DefaultSecurityProvider" connectionStringName="DefaultConnection" type="Telerik.Security.Data.DefaultSecurityProvider, Telerik.Security.Data" membershipProvider="Sitefinity" roleProvider="Sitefinity"/> 
                </providers> 

    I am not sure why it's not letting you change permissions on the role. Here is my code:

    <roleManager enabled="true" cacheRolesInCookie="true" defaultProvider="Sitefinity"
                <providers> 
                    <clear/> 
                    <add connectionStringName="DefaultConnection" applicationName="/" name="Sitefinity" type="Telerik.DataAccess.AspnetProviders.TelerikRoleProvider, Telerik.DataAccess"/> 
                    <add connectionStringName="DefaultConnection" applicationName="/2" name="Sitefinity2" type="Telerik.DataAccess.AspnetProviders.TelerikRoleProvider, Telerik.DataAccess"/> 
                </providers> 
            </roleManager> 
            <membership defaultProvider="Sitefinity" userIsOnlineTimeWindow="15" hashAlgorithmType=""
                <providers> 
                    <clear/> 
                    <add name="Sitefinity" connectionStringName="DefaultConnection" type="Telerik.DataAccess.AspnetProviders.TelerikMembershipProvider, Telerik.DataAccess" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" applicationName="/" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" passwordAttemptWindow="10" passwordStrengthRegularExpression="" minRequiredPasswordLength="1" minRequiredNonalphanumericCharacters="0"/> 
                    <add name="Sitefinity2" connectionStringName="DefaultConnection" type="Telerik.DataAccess.AspnetProviders.TelerikMembershipProvider, Telerik.DataAccess" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" applicationName="/2" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" passwordAttemptWindow="10" passwordStrengthRegularExpression="" minRequiredPasswordLength="1" minRequiredNonalphanumericCharacters="0"/> 
                </providers> 
            </membership> 
            <profile defaultProvider="Sitefinity"
                <providers> 
                    <clear/> 
                    <add name="Sitefinity" connectionStringName="DefaultConnection" applicationName="/" type="Telerik.DataAccess.AspnetProviders.TelerikProfileProvider, Telerik.DataAccess"/> 
                    <add name="Sitefinity2" connectionStringName="DefaultConnection" applicationName="/2" type="Telerik.DataAccess.AspnetProviders.TelerikProfileProvider, Telerik.DataAccess"/> 
     
                </providers> 
                <properties> 
                    <add name="FirstName"/> 
                    <add name="LastName"/> 
                </properties> 
            </profile> 
     
    <security defaultProvider="DefaultSecurityProvider" cmsProvidersName="Sitefinity"
                <roles> 
                    <clear/> 
                    <add name="Administrators" permission="Unrestricted"/> 
                    <add name="PublicUsers" permission="None"/> 
                </roles> 
                <providers> 
                    <clear/> 
                    <add name="DefaultSecurityProvider" connectionStringName="DefaultConnection" type="Telerik.Security.Data.DefaultSecurityProvider, Telerik.Security.Data" membershipProvider="Sitefinity" roleProvider="Sitefinity"/> 
                    <add name="SecurityProvider2" connectionStringName="Sitefinity2" type="Telerik.Security.Data.DefaultSecurityProvider, Telerik.Security.Data" membershipProvider="Sitefinity2" roleProvider="Sitefinity2"/> 
     
                </providers> 
            </security> 

    Please excuse my typo. I meant adding providers and it's on page 204 of our User Manual. Working with Users and Roles in that manual will show you how to limit users to certain pages and features.

    All the best,
    Joe
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  5. Vijaianand
    Vijaianand avatar
    94 posts
    Registered:
    09 Jul 2012
    20 Oct 2008
    Link to this post
    Hi Joe,

    It is totally getting confused. I like you to answer all my questions which I posted in my previous post. Actually what I want to know is, how can I disable admin from one instance.

    The reason, we have totally 2 different instance of sitefinity in 2 different servers. I am not talking about projects. I am not talking about sitefinity. If I have one instance in one server(internal) and another one is live server both host same prjoect. I want to disable the admin functionality from one server but it should still use less privilege for the sitefinity to function. How can I do that? How to deny some user privilege to admin ? ANyway, I know I can create different roles. What is the actual use of provider? Can I connect the provider with instances?

    Please help.

    VIJAI
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    21 Oct 2008
    Link to this post
    Hello VIJAIANAND,

    Thank you for getting back to us.

    Here are the answers to your questions:

    How can I disable admin from one instance?


    Remove the users from the web.config in one of the application you are talking about.

    <security defaultProvider="DefaultSecurityProvider" cmsProvidersName="Sitefinity"
          <roles> 
            <clear /> 
            <add name="Administrators" permission="Unrestricted" /> 
            <add name="PublicUsers" permission="None" /> 
          </roles> 
           .... 
    </security> 


    How to deny some user privilege to admin ?

    You can do this through Sitefinity's administrative area and page permission. UserManual, section Permissions

    What is the actual use of provider?

    Please take a look at our UserManual, Working with Multiple Web Sites

    Can I connect the provider with instances?

    You can connect the provider with instances by setting different applicationName="/" as it is shown in the previous post and the reference to the UserManaul.


    Please feel free to contact us if you need any assistance.

    All the best,
    Ivan Dimitrov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  7. Vijaianand
    Vijaianand avatar
    94 posts
    Registered:
    09 Jul 2012
    21 Oct 2008
    Link to this post
    Hey Ivan

    Thank you for your answers to my questions in specific. I tried few things and here is the output.

    1. It only took away the admin functionality for the admin user. Admin user can still login and it didn't totally disable it. I need to totally disable it.?!

    2. This option is not valid. All options are grayed out for admin in the permission page. I couldn't able to change.

    3. You asked me to refer to Working with Multiple site. My situation is different. I am working with multiple instance but only one site. One instance of sitefinity in live server and another instance in internal server. Both instance access same database meaning same admin user. How can disable the admin for one instance and not another instance. Or can I disable admin and create another user for internal instance. Help me..

    4. You mentioned provider can be attached to instances as application name. How come? I am using 2 different instance in 2 servers and both have different webconfig file. How do you do it ?

    5. Also I asked about caching. How do you efficently cache pages?

    Thanks. Hope to get a good response not the same old.

    VIJAI
  8. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    27 Oct 2008
    Link to this post
    Hi VIJAIANAND,

    1. It only took away the admin functionality for the admin user. Admin user can still login and it didn't totally disable it. I need to totally disable it.?!

    Could you please create a video or exact steps we could follow, in order to see the same behavior when you delete the roles from the web.config? If you want to totally disable the Administration, you could also delete the \[YourProject]\Sitefinity\Admin directory from your project.

    2. This option is not valid. All options are grayed out for admin in the permission page. I couldn't able to change.
    These options cannot be changed (they are grayed) for administrators role. The administrator role could be disabled as showed in our previous post.

    3. You asked me to refer to Working with Multiple site. My situation is different. I am working with multiple instance but only one site. One instance of sitefinity in live server and another instance in internal server. Both instance access same database meaning same admin user. How can disable the admin for one instance and not another instance. Or can I disable admin and create another user for internal instance. Help me..
    You can follow the instructions in point 1 (deleting the Admin directory/roles) from the instance you want.

    4. You mentioned provider can be attached to instances as application name. How come? I am using 2 different instance in 2 servers and both have different webconfig file. How do you do it ?
    It doesn't matter how many instances you have, as they all point to one database. The connection strings in both files point to the same database, right? So, all 4 providers are stored in it. You could have different providers in the different config files. You may have provider defined in the first web.config, that doesn't exists in the second one.

    5. Also I asked about caching. How do you efficently cache pages?
    You could refer to the KB article Optimizing Performance on Sitefinity Web Site, section Caching for an information about this topic.

    I hope you find this helpful.

    Sincerely yours,
    Georgi
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Register for webinar
8 posts, 0 answered