Configuration Error: XmlRoleProvider has already been added (new installation)

Topics: ASP.NET 2.0
May 11, 2013 at 12:53 PM
I'm trying to upgrade v2.7 to v2.8 and have encountered an error.

I've followed the upgrade instructions which detail copying the scripts/head folder, styles, themes, and App_Data.

I have then uploaded the source-code version of BlogEngine to an entirely new directory on my hosting server. The only setting I've made to the hosting server is to set it to ASP.NET 4 (Integrated). There have been no other changes to the web.config of, for that matter, any of the code.

When I navigate to the site I get the following error:
Parser Error Message: An item with the same key has already been added.

Source Error:

Line 131:      <providers>
Line 132:        <clear/>
Line 133:        <add name="XmlRoleProvider" [removed for brevity] />
Line 134:        <add name="SqlRoleProvider" [removed for brevity] />
Line 135:        <add name="DbRoleProvider" [removed for brevity] />
It's that line 133 that's highlighted as the source of the error.

I tried uploading it to my server because when I ran it locally I was getting the same error, but there were some oddities that made me suspect that my existing local copy of v2.7 was getting in the way.

Can anyone explain what's causing this error?
May 11, 2013 at 6:17 PM
Aha! My fault (of course).

I copied over my v2.7 users.xml file, and before I had checked anything I added a new user with the same name as a user already in the copied-over users.xml file.

Or more simply, there was a duplicate user in the users.xml file.