Server Error in '/EPi5Test' Application.
--------------------------------------------------------------------------------
Violation of PRIMARY KEY constraint 'PK_tblWindowsRelations'. Cannot insert duplicate key in object 'dbo.tblWindowsRelations'.
The statement has been terminated.
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.Data.SqlClient.SqlException: Violation of PRIMARY KEY constraint 'PK_tblWindowsRelations'. Cannot insert duplicate key in object 'dbo.tblWindowsRelations'.
The statement has been terminated.
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:
[SqlException (0x80131904): Violation of PRIMARY KEY constraint 'PK_tblWindowsRelations'. Cannot insert duplicate key in object 'dbo.tblWindowsRelations'.
The statement has been terminated.]
System.Data.Common.DbDataAdapter.UpdatedRowStatusErrors(RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount) +481
System.Data.Common.DbDataAdapter.UpdatedRowStatus(RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount) +41
System.Data.Common.DbDataAdapter.Update(DataRow[] dataRows, DataTableMapping tableMapping) +2028
System.Data.Common.DbDataAdapter.UpdateFromDataTable(DataTable dataTable, DataTableMapping tableMapping) +41
System.Data.Common.DbDataAdapter.Update(DataTable dataTable) +165
EPiServer.DataAccess.WindowsProviderDB.SynchronizeGroups(String userName, String[] groups) +1018
EPiServer.Security.WindowsMembershipProvider.ValidateUser(String username, String password) +795
EPiServer.Security.MultiplexingMembershipProvider.ValidateUser(String username, String password) +61
System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e) +131
System.Web.UI.WebControls.Login.AttemptLogin() +106
System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) +82
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35
System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +86
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +155
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4922
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.312; ASP.NET Version:2.0.50727.312
Try instead to add a user in the User Repository used by SqlMembershipProvider and log in using that user.
You can do this in the ASP.NET Configuration section (in Visual Studio choose "Project"->"ASP.NET Configuration section". Add a group called WebAdmins and a group called WebEditors. Finally add a new user and attach it to the "WebAdmins" and "WebEditors" groups.
Hopefully you will now be able to log in to EPiServer through the new user.
You will be able to log in as a WebAdmin och WebEdtitor but not as an Administrator. If you want to log in as an administrator, how do you do it then?
(I solved it though, I created a new Administrator role and assigned the user to it too, but that shouldn't be a preferred way to do it?)
I suspect this behaviour is due to the fact that this it is an pre release you run. I recommend you to try this again in the first RC and report it back if it still exists in that version.
Since I was installing on a machine without Visual Studio, I took a slightly more brutal approach and removed the private-key index from tblWindowsRelations. It resulted in a few duplicate lines in that table, but I could log in using my windows account.
I thought I would be able to create a "local" user with the normal admin interface, but for some reason, all fields were grayed out in Admin --> Create User! Anyway, for the purpose of playing around with EPiServer CMS, I can continue using the Windows account. Leaving the table without a private key does not seem to cause any trouble. I get exactly two items for exactly two groups (probably because of something in our AD setup for those two groups). Thus, surprisingly, no uncontrolled growth of the table. I tried adding the private key back after successfully logging in, but then I could not log back in after logging out.
Otto Giesenfeld
Im having the same problem in Release version 5.1.522.4
see this post for more details : http://www.episerver.com/en/EPiServer_Knowledge_Center/Developer-Forum2/EPiServer-Developer-Forums-/EPiServer-CMS-version-5/14280/
Hello,
I have the same problem.
Episerver 5 SP1 (version 5.1.422.122) and WindowsMembershipProvider and WindowsRoleProvider are used for authentication.
For some AD accounts it works without any problem and for some AD accounts it shows above exception after login on login form page.
Is there any news related to this problem? Maybe someone solved it in the meanwhile?
Best Regards
Vlada