Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...table aspnet_UsersInRoles is no longer updatedtable aspnet_UsersInRoles is no longer updated
Previous
 
Next
New Post
4/30/2006 4:42 PM
 
Hi, I moved my DNN 4.0.2. installation (DB & website) to a new server. After updating the configuration (connection strings, site URLs) everything seemed to work.

But now I have one problem: it seems that the group membership does no longer work. When I assign a user to a group (e.g. "DevTeam") he still can't see pages/tabs which should be visible to users of that group.

After looking at the database, it seems that everything gets stored correctly in the following tables: Users, Roles, UserRoles, TabPermission. But it seems that the tables aspnet_Roles, aspnet_UsersInRoles, etc. are not updated.

Questions:
  • are the tables aspnet_XXX used or is everything handled using the other tables (Users, Roles...)?
  • what could be the reason for my problem?
  • any idea how to fix it?
Thanks a lot for any help.

Best regards,
Martin
 
New Post
5/8/2006 8:27 AM
 
Today I manually synchronized the table aspnet_UsersInRoles with the table UserRoles. But even after that, when I add a role to a user (in the admin interface) it is not added to the aspnet_UsersInRoles table. After that, adding/removing roles to/from users will no longer work.

Is there anyone how can help or at least point me to the correct place to get help?

Thanks a lot,
Martin


 
New Post
5/9/2006 8:34 AM
 
Tschou Tinu!
ich nehme an, Du verstehst das!

I've got the same trouble here. Look also to the Threads

http://www.dotnetnuke.com/Community/ForumsDotNetNuke/tabid/795/forumid/89/threadid/22046/scope/posts/Default.aspx
--> There is a SQL-Script to synchronize aspnet_UsersInRoles with UserRoles.

and

http://www.dotnetnuke.com/Community/ForumsDotNetNuke/tabid/795/forumid/108/threadid/23099/scope/posts/Default.aspx
--> From myself

I haven't found a solution, but you can set the notification on this threads. Write something if you get a solution!

Greetings

the bimper

ps: Sorry about my english, but Schwiizerditsch gaht miär ringer!
 
New Post
5/14/2006 11:46 PM
 

Fix SP aspnet_UsersInRoles_AddUsersToRoles as suggested in comment to DNNP-2920 and let us know, if it fixed the problem.


Michael Freidgeim http://geekswithblogs.net/mnf
 
New Post
5/15/2006 3:56 AM
 
Hello mfreidge

I've looked at the sp's dbo.aspnet_UsersInRoles_AddUsersToRoles and dbo.aspnet_UsersInRoles_RemoveUsersFromRoles, but I haven't found a parameter or line with @tbNames.

I've also looked at InstallRoles.sql, but I haven't found.

Can you explain, at which lines to add the Command "COLLATE database_default"?

The Installation is DNN 4.0.3 on Win2k3 with IIS 6 and a separate DB-Server with MS-SQL Server 2000.

Thank you!

the bimper

The following lines is my dbo.aspnet_UsersInRoles_AddUsersToRoles:

CREATE PROCEDURE dbo.aspnet_UsersInRoles_AddUsersToRoles
@ApplicationName NVARCHAR(256),
@UserNames NVARCHAR(4000),
@RoleNames NVARCHAR(4000),
@TimeZoneAdjustment INT
AS
BEGIN
DECLARE @ApplicationId UNIQUEIDENTIFIER
SELECT @ApplicationId = NULL
SELECT @ApplicationId = ApplicationId FROM aspnet_Applications WHERE LOWER(@ApplicationName) = LoweredApplicationName
IF (@ApplicationId IS NULL)
RETURN(2)


DECLARE @TranStarted BIT
DECLARE @ErrorCode INT
SET @ErrorCode = 0
SET @TranStarted = 0

IF( @@TRANCOUNT = 0 )
BEGIN
BEGIN TRANSACTION
SET @TranStarted = 1
END
ELSE
SET @TranStarted = 0

DECLARE @RoleId UNIQUEIDENTIFIER
DECLARE @UserId UNIQUEIDENTIFIER
DECLARE @UserName NVARCHAR(256)
DECLARE @RoleName NVARCHAR(256)

DECLARE @CurrentPosU INT
DECLARE @NextPosU INT
DECLARE @CurrentPosR INT
DECLARE @NextPosR INT

SELECT @CurrentPosU = 1

WHILE(@CurrentPosU <= LEN(@UserNames))
BEGIN
SELECT @NextPosU = CHARINDEX(N',', @UserNames, @CurrentPosU)
IF (@NextPosU = 0 OR @NextPosU IS NULL)
SELECT @NextPosU = LEN(@UserNames) + 1

SELECT @UserName = SUBSTRING(@UserNames, @CurrentPosU, @NextPosU - @CurrentPosU)
SELECT @CurrentPosU = @NextPosU+1

SELECT @CurrentPosR = 1
WHILE(@CurrentPosR <= LEN(@RoleNames))
BEGIN
SELECT @NextPosR = CHARINDEX(N',', @RoleNames, @CurrentPosR)
IF (@NextPosR = 0 OR @NextPosR IS NULL)
SELECT @NextPosR = LEN(@RoleNames) + 1
SELECT @RoleName = SUBSTRING(@RoleNames, @CurrentPosR, @NextPosR - @CurrentPosR)
SELECT @CurrentPosR = @NextPosR+1


SELECT @RoleId = NULL
SELECT @RoleId = RoleId FROM dbo.aspnet_Roles WHERE LoweredRoleName = LOWER(@RoleName) AND ApplicationId = @ApplicationId
IF (@RoleId IS NULL)
BEGIN
SELECT @RoleName
SET @ErrorCode = 2
GOTO Cleanup
END

SELECT @UserId = NULL
SELECT @UserId = UserId FROM dbo.aspnet_Users WHERE LoweredUserName = LOWER(@UserName) AND ApplicationId = @ApplicationId
IF (@UserId IS NULL)
BEGIN
DECLARE @DateTimeNowUTC DATETIME
EXEC dbo.aspnet_GetUtcDate @TimeZoneAdjustment, @DateTimeNowUTC OUTPUT
EXEC dbo.aspnet_Users_CreateUser @ApplicationId, @UserName, 0, @DateTimeNowUTC, @UserId OUTPUT
END

IF (EXISTS(SELECT * FROM dbo.aspnet_UsersInRoles WHERE @UserId = UserId AND @RoleId = RoleId))
BEGIN
SELECT @UserName, @RoleName
SET @ErrorCode = 3
GOTO Cleanup
END
INSERT INTO dbo.aspnet_UsersInRoles (UserId, RoleId) VALUES(@UserId, @RoleId)
END
END

IF( @TranStarted = 1 )
BEGIN
SET @TranStarted = 0
COMMIT TRANSACTION
END

RETURN(0)

Cleanup:

IF( @TranStarted = 1 )
BEGIN
SET @TranStarted = 0
ROLLBACK TRANSACTION
END

RETURN @ErrorCode
END

GO
 
Previous
 
Next
HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...table aspnet_UsersInRoles is no longer updatedtable aspnet_UsersInRoles is no longer updated


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out