The page is supposed to allow admin to assign membership roles. I'm pretty sure this was working, but it's definitely not working now. Error message: "Could not find stored procedure 'dbo.aspnet_UsersInRoles_AddUsersToRoles'." The offending lines of source code: Line 69: If RoleCheckBox.Checked Then Line 70: ' Add the user to the role LĂnea 71: Roles.AddUserToRole(selectedUserName, roleName) Line 72: Line 73: ' Display a status message I'm a newbie. Any ideas?
Problem solved I ended up restoring my aspnetdb database and that solved the problem. No idea why. Maybe someone with more knowledge can help clarify what happened.
Did you drop your database and recreated it? If you did the schema that handles the ASP.Net membership/roles may have been deleted. Try running these steps again. http://support.Winhost.com/KB/a619/how-to-configure-the-aspnet-20-membershiproles-provider.aspx
Hate to bump an old thread but im having the same issue here. My roles were working fine before, I even was able to add/delete users from roles. Since last I remember it working I had to make some changes to my web/config to allow the admin to change user passwords. Code: <membership> <providers> <clear /> <add connectionStringName="ConnectionString" enablePasswordRetrieval="true" enablePasswordReset="true" requiresQuestionAndAnswer="false" applicationName="/" requiresUniqueEmail="false" passwordFormat="Encrypted" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" passwordStrengthRegularExpression="" name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> </providers> </membership> As far as I can remember I have not done anything else that I can think would have caused my role management page to stop working. Has anyone else had this problem? how can I fix it? I tried restoring my dbase but I get an error in sql server Should I delete my dbase and deploy it again? Id rather not if I don not have to as I have done some work on it since last I deployed.. and I unfortunatley have not yet created a backup while still in a testing phase. Any help would be greatly appreciated
I just tried re-deploying my database and got error msg's: Msg 468, Level 16, State 9, Procedure aspnet_UsersInRoles_RemoveUsersFromRoles, Line 53 Cannot resolve the collation conflict between "Latin1_General_CI_AS" and "SQL_Latin1_General_CP1_CI_AS" in the equal to operation. Msg 468, Level 16, State 9, Procedure aspnet_UsersInRoles_RemoveUsersFromRoles, Line 58 Cannot resolve the collation conflict between "Latin1_General_CI_AS" and "SQL_Latin1_General_CP1_CI_AS" in the equal to operation. Msg 468, Level 16, State 9, Procedure aspnet_UsersInRoles_RemoveUsersFromRoles, Line 87 Cannot resolve the collation conflict between "Latin1_General_CI_AS" and "SQL_Latin1_General_CP1_CI_AS" in the equal to operation. Msg 468, Level 16, State 9, Procedure aspnet_UsersInRoles_RemoveUsersFromRoles, Line 92 Cannot resolve the collation conflict between "Latin1_General_CI_AS" and "SQL_Latin1_General_CP1_CI_AS" in the equal to operation. Msg 468, Level 16, State 9, Procedure aspnet_UsersInRoles_AddUsersToRoles, Line 48 Cannot resolve the collation conflict between "Latin1_General_CI_AS" and "SQL_Latin1_General_CP1_CI_AS" in the equal to operation. Msg 468, Level 16, State 9, Procedure aspnet_UsersInRoles_AddUsersToRoles, Line 52 Cannot resolve the collation conflict between "Latin1_General_CI_AS" and "SQL_Latin1_General_CP1_CI_AS" in the equal to operation. Msg 468, Level 16, State 9, Procedure aspnet_UsersInRoles_AddUsersToRoles, Line 79 Cannot resolve the collation conflict between "Latin1_General_CI_AS" and "SQL_Latin1_General_CP1_CI_AS" in the equal to operation. Msg 468, Level 16, State 9, Procedure aspnet_UsersInRoles_AddUsersToRoles, Line 83 Cannot resolve the collation conflict between "Latin1_General_CI_AS" and "SQL_Latin1_General_CP1_CI_AS" in the equal to operation. Msg 468, Level 16, State 9, Procedure aspnet_UsersInRoles_AddUsersToRoles, Line 93 Cannot resolve the collation conflict between "Latin1_General_CI_AS" and "SQL_Latin1_General_CP1_CI_AS" in the equal to operation. Msg 15151, Level 16, State 1, Line 1 Cannot find the object 'aspnet_UsersInRoles_AddUsersToRoles', because it does not exist or you do not have permission. Msg 15151, Level 16, State 1, Line 1 Cannot find the object 'aspnet_UsersInRoles_RemoveUsersFromRoles', because it does not exist or you do not have permission. got this error in sqlserver too
Have you tried updating the collation on your Winhost SQL 2008 database? The error shows a lot of conflicts in collation. By default the Winhost SQL 2008 database is created with a collation of Latin1_General_CI_AS. But since you are a dbo to your own database, you should have the privileges to change it.
yes.. I have this topic a little too spread out.. lets keep it in here for now.. I have tried tochange the collation but as I said in the other thread I get errors saying that it is not a valid column.. my code is: SELECT name, Latin1_General_CI_AS FROM sys.databases; GO ALTER DATABASE [mydbasename] SET SINGLE_USER WITH ROLLBACK IMMEDIATE; GO ALTER DATABASE [mydbasename] COLLATE CollationName; GO ALTER DATABASE [mydbasename] SET MULTI_USER; GO SELECT name, Latin1_General_CI_AS FROM sys.databases; GO error msg is: Msg 207, Level 16, State 1, Line 1 Invalid column name 'Latin1_General_CI_AS'. Msg 448, Level 16, State 3, Line 1 Invalid collation 'CollationName'. Msg 207, Level 16, State 1, Line 1 Invalid column name 'Latin1_General_CI_AS'.
I suggest you stick with the thread http://forum.Winhost.com/showthread.php?p=12129#post12129 for this issue. Your issue is getting a little confusing because you posted it in multiple places.