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

Forums / Bugs & Issues / ProviderException: The specified role "Administrators" already exists.

ProviderException: The specified role "Administrators" already exists.

17 posts, 0 answered
  1. Henry
    Henry avatar
    2 posts
    Registered:
    27 Dec 2010
    07 Jan 2011
    Link to this post

    Hi all,

    Sitefinity new bee here.

    When I try to start a new project, after registering the administrator account, I get the following error message:
    (Where did I go wrong?)

    The specified role "Administrators" already exists.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Configuration.Provider.ProviderException: The specified role "Administrators" already exists.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [ProviderException: The specified role "Administrators" already exists.]
       Telerik.Sitefinity.Security.Data.OpenAccessRoleProvider.CreateRole(Guid id, String roleName) +439
       Telerik.Sitefinity.Web.UI.Backend.AdministratorPane.EnsureRole(RoleDataProvider roles, RoleInfo role) +438
       Telerik.Sitefinity.Web.UI.Backend.AdministratorPane.DoWork() +56
       Telerik.Sitefinity.Web.UI.Backend.StartupWizard.wizard_FinishButtonClick(Object sender, InternalWizardNavigationEventArgs e) +136
       Telerik.Sitefinity.Web.UI.Backend.InternalWizard.OnFinishButtonClick(InternalWizardNavigationEventArgs e) +96
       Telerik.Sitefinity.Web.UI.Backend.InternalWizard.OnBubbleEvent(Object source, EventArgs e) +540
       System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
       System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +107
       System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +161
       System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +9
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
       System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +174
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4653
    

     


    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

  2. Vlad
    Vlad avatar
    498 posts
    Registered:
    15 Jul 2016
    12 Jan 2011
    Link to this post
    Hi Henry,

    Seems you are connecting to a database which is already used by another Sitefinity application. Currently this scenario is not working. It is planned for Q1 of 2011  (the end of March).
    For the time being specify a different database connection.

    Greetings,
    Vlad
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Kelly
    Kelly avatar
    24 posts
    Registered:
    05 May 2010
    11 Feb 2011
    Link to this post
    I have run into the same issue. I tried creating a new database, and I am still getting the same error.
  4. Henry
    Henry avatar
    2 posts
    Registered:
    27 Dec 2010
    11 Feb 2011
    Link to this post
    Hey all,

    In reply to Kelly's post, here is what I did not understood as a new bee.

    The first time I installed Sitefinity, I created a new project. When setting up that project, I had to tell which database I wanted the project to connect to.

    What I did not knew is that after you tell which database to connect to, the setup will insert new tables into that database which the Sitefinity project needs for things such as authorisation and other CMS related functions.

    After creating that first project as an experiment, I deleted it and created another one. And by telling the second project to connect to the same database again, I got the mentioned error. This is because Sitefinity has already inserted the authorisation table into that particular database already and the admin account had been setup already when I created the first project.

    So, when creating a new Sitefinity project, you need to connect to a database which has not had the Sitefinity tables inserted into it already. Then you will not have the authorization problem.







  5. Kelly
    Kelly avatar
    24 posts
    Registered:
    05 May 2010
    11 Feb 2011
    Link to this post
    Thank you for the follow up Henry. After seeing your first post, I realized that was the problem. So, I created a new database and tried to associate the new project with the new database. However, I am still getting the same error.
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    15 Feb 2011
    Link to this post
    Hello,

    I am not sure how this could happen with a new project with a new database. Can you try to replicate the issue on our sandbox . If the database and the project are completely new I do not see an option where you can get "The specified role "Administrators" already exists."

    All the best,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  7. Gauree
    Gauree avatar
    9 posts
    Registered:
    11 Mar 2011
    23 Mar 2011
    Link to this post
    I am also getting same error.

    I have one existing project and I created a new project and connected it with totally different database engine and different database still it is throwing same error.

  8. Gauree
    Gauree avatar
    9 posts
    Registered:
    11 Mar 2011
    24 Mar 2011
    Link to this post
    Found Solution :-

    I used totally different database server than that of  1st project.
    Then created a new database in it.

    Then created a second new project in SF. and defined the above database connection  and it worked.

  9. Jay
    Jay avatar
    1 posts
    Registered:
    04 Apr 2006
    19 Apr 2011
    Link to this post
    Having to use a different database server wasn't acceptable for me.  I just killed the sitefinity integrated web server process, restarted it through the project manager, and then it worked.
  10. Rob
    Rob avatar
    2 posts
    Registered:
    21 Apr 2011
    22 Apr 2011
    Link to this post
    I wasn't able to use a different server either, however I managed to fix the issue.

    In the existing database, you need to drop every single table that's in there.  This isn't "undo-able", so ensure you want to start from scratch, since that's what you'll be doing.

    Once you've done that, RECYCLE IIS (or the App Pool) and then run the setup wizard again.  Apparently this error situation is cached.

    Good luck, you'll need it with SiteFinity.
  11. Howard
    Howard avatar
    4 posts
    Registered:
    11 May 2011
    16 May 2011
    Link to this post
    What is the name of the database? I have two databases created in my local SQL Server and neither of them seems to be related to Sitefinity ("ReportServer" and "ReportServerTempDB"). Thanks.
  12. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    17 May 2011
    Link to this post
    Hello,

    Check App_Data/Sitefinity/Configuration/DataCondif. There you should find reference to the database that the project uses.

    Kind regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  13. Swati
    Swati avatar
    9 posts
    Registered:
    19 Apr 2011
    16 Feb 2012
    Link to this post
    Dear Sitefinity Team,
    I am trying to connect to existing database with new Sitefinity project (4.4 version). And getting the above stated error i.e. "The specified role 'Administrators' already exists." It has been told in this thread that connecting to database is planned for March 2011 Q1. But it seems that the problem is not resolved yet. Please guide.
    Thanks,
    Swati
  14. Victor Velev
    Victor Velev avatar
    1345 posts
    Registered:
    06 Jul 2015
    17 Feb 2012
    Link to this post
    Hello Swati,

    The error

    The specified role "Administrators" already exists.

    states that you cannot create the specific role in the database because it already exists and the system is trying to create new one. The possible reason for this is that your database connection is not properly configured and the system is trying to insert new tables in previously existing ones.

    Probable causes:

    - the App_Data/Configuration/ folder and its files keep reference to the roles created in your project. For instance if you try to install a new project with some old config files, you will get the same error.

    - The database has record for Administrators role, but it is missing from the configuration files which causes an attempt for duplicate row in the config that we prevent.

    All the best,
    Victor Velev
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  15. Mykhail Galushko
    Mykhail Galushko avatar
    2 posts
    Registered:
    11 Nov 2009
    08 May 2012
    Link to this post
    I try to install Sitefinity on new empty azure db and get this error.
    New deploy, new db - nothing helps
  16. Mykhail Galushko
    Mykhail Galushko avatar
    2 posts
    Registered:
    11 Nov 2009
    08 May 2012
    Link to this post
    I try to install Sitefinity on new empty azure db and get this error.
    New deploy, new db - nothing helps
  17. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    09 May 2012
    Link to this post
    Hi,

    First you need to install Sitefinity locally and then migrate it to your azure account - db, hosted service etc. Also you should enable the following lines in the web.config that will ensure that your project will not write not inside config files, but inside the DB.

    <sectionGroup name="telerik">
          <section name="sitefinity" type="Telerik.Sitefinity.Configuration.SectionHandler, Telerik.Sitefinity" requirePermission="false" />
        </sectionGroup>

    <telerik>
        <sitefinity>
          <environment platform="WindowsAzure"/>
          <sitefinityConfig storageMode="Database" />
        </sitefinity>
      </telerik>

    You get this error because you are trying to install Sitefinity directly on Azure and storageMode is not  database.

    Kind regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
17 posts, 0 answered