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 ...User import breaks User Accounts moduleUser import breaks User Accounts module
Previous
 
Next
New Post
2/14/2006 4:53 PM
 

After importing users from an existing application, I receive the following error when attempting to view the User Accounts under the Admin tab. Any ideas on why this would occur?

Error: User Accounts is currently unavailable.
DotNetNuke.Services.Exceptions.ModuleLoadException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object. at ASP.admin_users_users_ascx.__DataBinding__control19(Object sender, EventArgs e) in http://server/dnn/Admin/Users/users.ascx:line 52 at System.Web.UI.Control.OnDataBinding(EventArgs e) at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) at System.Web.UI.Control.DataBind() at System.Web.UI.Control.DataBindChildren() at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) at System.Web.UI.Control.DataBind() at System.Web.UI.Control.DataBindChildren() at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) at System.Web.UI.Control.DataBind() at System.Web.UI.WebControls.DataGrid.CreateItem(Int32 itemIndex, Int32 dataSourceIndex, ListItemType itemType, Boolean dataBind, Object dataItem, DataGridColumn[] columns, TableRowCollection rows, PagedDataSource pagedDataSource) at System.Web.UI.WebControls.DataGrid.CreateControlHierarchy(Boolean useDataSource) at System.Web.UI.WebControls.BaseDataList.OnDataBinding(EventArgs e) at System.Web.UI.WebControls.BaseDataList.DataBind() at DotNetNuke.Modules.Admin.Users.UserAccounts.BindData(String SearchText, String SearchField) in http://server/dnn/Admin/Users/Users.ascx.vb:line 154 at DotNetNuke.Modules.Admin.Users.UserAccounts.Page_Load(Object sender, EventArgs e) in http://server/dnn/Admin/Users/Users.ascx.vb:line 368 --- End of inner exception stack trace

 

 
New Post
2/15/2006 7:07 AM
 
This might be caused by users that have not been added to the MSFT membership tables. There's a script in the asp.net forum you can search for to synch them.

Do you know the truth when you hear it?
Néstor Sánchez
The Dúnadan Raptor -->Follow Me on Twitter Now!
 
New Post
11/20/2006 6:06 AM
 

I think I know which script you're referring to (I have copied it below). Thing is... I am getting the exact same error as the previous poster and step 3 of the instructions to check for any sync issues returns... nothing.

>>>

With this error, some of the tables in the database are no long in sync. The aspnet_* tables are no longer in sunc with the DNN Users table. To fix this, you will need to run a couple SQL commands. Please follow the directions below.

Check if the table are out of sync
1. Log in with the Host account.
2. Under the Host tab, click the SQL menu option.
3. Run this command:
select * from aspnet_Users au left outer join Users u on au.UserName = U.UserName where U.UserName is null

Note: If this command returns any records, your tables are out of sync. You will need to continue on with step 4. If no records are returned, your tables are fine and your problems lies elsewhere.

4. Place a checkmark in the box next to "Run as Script".
5. You will need to copy and paste the following into the SQL window:

DECLARE @UserName varchar (50)

--get a cursor to hold all the orphaned users
--that are in aspnet_Users table that are not in the DNN Users table
DECLARE users_cursor CURSOR FOR
SELECT au.UserName FROM aspnet_Users au
LEFT OUTER JOIN Users u on au.UserName = U.UserName
WHERE U.UserName is null

OPEN users_cursor

-- Perform the first fetch.
FETCH NEXT FROM users_cursor INTO @UserName

-- Check @@FETCH_STATUS to see if there are any more rows to fetch.
WHILE @@FETCH_STATUS = 0
BEGIN
--delete the user from all the aspnet_* tables that it may be in
--one at a time to avoid referrential integrity constraints

delete aspnet_Membership where UserId = (select am.UserId from aspnet_Membership am inner join aspnet_Users au on am.UserId = au.UserId where au.Username =@UserName)
delete aspnet_Profile where UserId = (select ap.UserId from aspnet_Profile ap inner join aspnet_Users au on ap.UserId = au.UserId where au.Username =@UserName)
delete aspnet_UsersInRoles where UserId in (select uir.UserId from aspnet_UsersInRoles uir inner join aspnet_Users au on uir.UserId = au.UserId where au.Username =@UserName)

delete from aspnet_Users where Username =@UserName

FETCH NEXT FROM users_cursor INTO @UserName
END

CLOSE users_cursor
DEALLOCATE users_cursor
GO

6. Click the Execute link.

This should fix your tables and you should be good to go.

<<<

 
Previous
 
Next
HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...User import breaks User Accounts moduleUser import breaks User Accounts module


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