Add Users to Group

 

Hi,

EPiServer CMS 5 Release , MS SQL 2000

I have deployed the local database and site to the production environment. The site works appears to work fine However, when I add a user to a group I get the following message:

Unexpected Provider error! This may be caused by invalid combination of Role and Membership providers

I have checked the provider in the web.config and they are the same as the development version (SqlServerRoleProvider). I can add / edit /delete users and I can add / delete groups. I just cannot assign a user to a group?

Can anyone shed some light on this or point me in the right direction?

Thanks

#20137 May 22, 2008 3:37
  • Member since: 2003
     
    In your web.config: make sure that the membership defaultProvider is set to SqlServerMembershipProvider.
    #20138 May 22, 2008 9:29
  • Member since: 2008
     

    James, did you solve this?

    I got this problem aswell after deploying to production environment. In web.config the defaultProvider is set to SqlServerRoleProvider for roleManager and for membership the defaultProvider is set to SqlServerMembershipProvider.

    The error message says "Unexpected Provider error! This may be caused by invalid combination of Role and Membership providers." and:

    at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
    at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
    at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
    at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
    at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
    at System.Data.SqlClient.SqlDataReader.get_MetaData()
    at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
    at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
    at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
    at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
    at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
    at System.Web.Security.SqlRoleProvider.RemoveUsersFromRolesCore(SqlConnection conn, String usernames, String roleNames) at System.Web.Security.SqlRoleProvider.RemoveUsersFromRoles(String[] usernames, String[] roleNames)
    at System.Web.Security.Roles.RemoveUserFromRoles(String username, String[] roleNames) at EPiServer.UI.Edit.UserMembership.SaveMembershipRoles() at EPiServer.UI.Edit.UserMembership.SaveButton_Click(Object sender, EventArgs e)

    Does anyone got any ideas?

    #20524 Jun 04, 2008 9:49
  • This message was deleted by Martin Betz at Nov 10, 2008 10:59.
  • Member since: 2007
     
    I had the same problem on a migrated database (4.62 -> 5 R2) 

    It turned out to be a collation problem.

    The database did not have the same collation as the database server. 

    I tried to change collation with the SQL Server Management studio but it only changed the collation of the database and the tables, but NOT on the columns.

    So I had to download a tool for changing collation on the column level.

    http://www.codeproject.com/KB/database/ChangeCollation.aspx?display=Print

    After changing collation (everywhere) it works for me!

    #25871 Nov 10, 2008 16:33
  • Member since: 2003
     

    Same problem here on migrated database (4.62B -> 5 R2)

    Unexpected Provider error! This may be caused by invalid combination of Role and Membership providers

    It turned out NOT to be a collation problem

    But another interesting thing I found! The problem appeared with the users without e-mail or that the user had been registered more than once with the same e-mail.

    I think migration program should have atleast raised a warnings flag...

    Hopes this helps someone else with the same problem

    #26261 Nov 27, 2008 20:02
  • Member since: 2008
     
    I have the same problem. It is the email address. Trying to enter an already existing e-mail address is probably going to be fairly common, so the error message should really be more specific for this.
    #27880 Feb 11, 2009 15:21
  •  

    Hi, has anybody else had this issue? I have the provider setup correctly, and no duplicate details, but I still get the error message when I try to add anyone to a role. Any other ideas? Would the colation thing be the issue in this case? How can you work out what the real error is?

    #34392 Nov 05, 2009 13:30
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
Please login to post a reply