System.NullReferenceException: Object reference not set to an instance of an object. at DotNetNuke.Services.FileSystem.FolderController.SetMappedDirectory(String VirtualDirectory)
Hi all,
I'm getting the following error when I try to Admin/Users...
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 DotNetNuke.Common.Globals.FormatEmail(String Email) at DotNetNuke.Modules.Admin.Users.UserAccounts.DisplayEmail(String Email) --- End of inner exception stack trace ---
This is occuring simultaneously with the inability of DNN to email me the password for the admin account of this installation.
I've manually review the email entries in ASPNET_Membership and can't see any malformed emails...
John,
This is one of those humbling moments... I am looking at the Users table in SQL Enterprise manager... no email column. I thought that DNN kept user information somewhat redundantly, in both its own tables and the ASPNET tables to prep for 2.0 compatibility.
Long and the short of it is... I don't know where the email column I need to check resides!
While I'm at it, are user passwords (hashed) only kept in the ASPNET table? Or are they too, stored redundantly.
Yes, the e-mail field is redundant and was removed in the first betas of DNN 3.x and then put back before the release version (3.0.13) to support some modules that were using it directly for backwards compatability. It sounds like you make have somehow wound
up in a state that didn't get that column added back. It should be in the <objectQualifier>Users table.
You could take a look at the install logs to try and find out where the error might have happened in upgrading through the betas.
They are in the DotNetNuke\Providers\DataProviders\SqlDataProvider folder.
You might want to just try adding the e-mail column and populating it from the the aspnet_membership table.
Passwords are only kept (hashed) in the aspnet_membership table.
Hi all,
Thank you for the helpful sql (s) to clean up the extra rows in user tables. I am able to see the User accounts now.
However, I have been getting this problem in 3.1.0, I didnt see anyone else reporting it in 3.1.0
My dnn_Version table looks like this, which I suppose indicates that the upgrades worked fine.
1 3 0 12 3/20/2005 8:58:36 AM
2 3 0 13 6/10/2005 6:28:41 AM
3 3 1 0 6/10/2005 6:28:43 AM
However I dont think the problem of registering new users has been resolved.
Any idea how to do that ?
The users table will only have the aspnet qualifier in front. These are a back ported version of the membership components that will ship with ASP .Net 2.0. They are provisioned separate from the rest of the rest of th dnn objects and thus will not have the
object qualifier pre-pended to the object name.
Hi
I used the cursor given below, which fixed the error on the user accounts page. However I still cant register new users. I also tried to change to Administrator account under site settings to some other account other than administrator account as specified
by "Michael Washington" in this thread.
I still could not register new users.
Oh, btw , I am using a 3.0.12 upgraded to 3.1.0
Any help is greatly appreciated.
Thanks
--RUN FIRST TO SEE DISCREPANCIES
select * from aspnet_Users au left outer join Users u on au.UserName = U.UserName where U.UserName is null
-- RUN NEXT
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
I am having the problem where I can't register new users in 3.1.0 also. I think this is also resulting in me not being able to create new portals (child or parent). This makes sense since these portals create new users.
I ran the SQL scripts above and found a few records that were out of sync. When I run the "step 2", the clean up procedure, I get these results:
(1 row(s) affected)
(0 row(s) affected)
(0 row(s) affected)
(1 row(s) affected)
(1 row(s) affected)
(0 row(s) affected)
(0 row(s) affected)
(1 row(s) affected)
Server: Msg 512, Level 16, State 1, Line 21
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
The statement has been terminated.
(0 row(s) affected)
(0 row(s) affected)
Server: Msg 547, Level 16, State 1, Line 32
DELETE statement conflicted with COLUMN REFERENCE constraint 'FK__aspnet_Membership_Users'. The conflict occurred in database 'kitchweb', table 'aspnet_Membership', column 'UserId'.
The statement has been terminated.
Server: Msg 512, Level 16, State 1, Line 21
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
The statement has been terminated.
(0 row(s) affected)
(0 row(s) affected)
Server: Msg 547, Level 16, State 1, Line 32
DELETE statement conflicted with COLUMN REFERENCE constraint 'FK__aspnet_Membership_Users'. The conflict occurred in database 'kitchweb', table 'aspnet_Membership', column 'UserId'.
The statement has been terminated.
Server: Msg 512, Level 16, State 1, Line 21
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
The statement has been terminated.
(0 row(s) affected)
(0 row(s) affected)
Server: Msg 547, Level 16, State 1, Line 32
DELETE statement conflicted with COLUMN REFERENCE constraint 'FK__aspnet_Membership_Users'. The conflict occurred in database 'kitchweb', table 'aspnet_Membership', column 'UserId'.
The statement has been terminated.
Server: Msg 512, Level 16, State 1, Line 21
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
The statement has been terminated.
(0 row(s) affected)
(0 row(s) affected)
Server: Msg 547, Level 16, State 1, Line 32
DELETE statement conflicted with COLUMN REFERENCE constraint 'FK__aspnet_Membership_Users'. The conflict occurred in database 'kitchweb', table 'aspnet_Membership', column 'UserId'.
The statement has been terminated.
(1 row(s) affected)
(0 row(s) affected)
(0 row(s) affected)
(1 row(s) affected)
Server: Msg 512, Level 16, State 1, Line 21
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
The statement has been terminated.
(0 row(s) affected)
(0 row(s) affected)
Server: Msg 547, Level 16, State 1, Line 32
DELETE statement conflicted with COLUMN REFERENCE constraint 'FK__aspnet_Membership_Users'. The conflict occurred in database 'kitchweb', table 'aspnet_Membership', column 'UserId'.
The statement has been terminated.
Server: Msg 512, Level 16, State 1, Line 21
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
The statement has been terminated.
(0 row(s) affected)
(0 row(s) affected)
Server: Msg 547, Level 16, State 1, Line 32
DELETE statement conflicted with COLUMN REFERENCE constraint 'FK__aspnet_Membership_Users'. The conflict occurred in database 'kitchweb', table 'aspnet_Membership', column 'UserId'.
The statement has been terminated.
Server: Msg 512, Level 16, State 1, Line 21
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
The statement has been terminated.
(0 row(s) affected)
(0 row(s) affected)
Server: Msg 547, Level 16, State 1, Line 32
DELETE statement conflicted with COLUMN REFERENCE constraint 'FK__aspnet_Membership_Users'. The conflict occurred in database 'kitchweb', table 'aspnet_Membership', column 'UserId'.
The statement has been terminated.
It did seem that the # of matching results from step 1 went from 10 to 7, but it's odd that there were errors, right?
adefwebserve...
Contributor
5912 Points
1207 Posts
MVP
Re: User Accounts is currently unavailable
Jun 04, 2005 06:10 PM|LINK
Open Light Group
LightSwitchHelpWebsite.com | ADefWebserver.com
dgerding
Member
55 Points
11 Posts
Re: User Accounts is currently unavailable
Jun 14, 2005 07:03 PM|LINK
I'm getting the following error when I try to Admin/Users...
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 DotNetNuke.Common.Globals.FormatEmail(String Email) at DotNetNuke.Modules.Admin.Users.UserAccounts.DisplayEmail(String Email) --- End of inner exception stack trace ---
This is occuring simultaneously with the inability of DNN to email me the password for the admin account of this installation.
I've manually review the email entries in ASPNET_Membership and can't see any malformed emails...
Any help is greatly appreciated!
Thanks,
Dave Gerding
J7Mitch
Star
13145 Points
2632 Posts
Re: User Accounts is currently unavailable
Jun 14, 2005 08:05 PM|LINK
Your error does look like a bad or empty e-mail address, did you also check the e-mail addresses in the Users table?
Uglytruth
Member
233 Points
47 Posts
Re: User Accounts is currently unavailable
Jun 14, 2005 08:09 PM|LINK
dgerding
Member
55 Points
11 Posts
Re: User Accounts is currently unavailable
Jun 15, 2005 12:58 AM|LINK
This is one of those humbling moments... I am looking at the Users table in SQL Enterprise manager... no email column. I thought that DNN kept user information somewhat redundantly, in both its own tables and the ASPNET tables to prep for 2.0 compatibility. Long and the short of it is... I don't know where the email column I need to check resides!
While I'm at it, are user passwords (hashed) only kept in the ASPNET table? Or are they too, stored redundantly.
Thanks again!
J7Mitch
Star
13145 Points
2632 Posts
Re: User Accounts is currently unavailable
Jun 15, 2005 02:56 PM|LINK
You could take a look at the install logs to try and find out where the error might have happened in upgrading through the betas.
They are in the DotNetNuke\Providers\DataProviders\SqlDataProvider folder.
You might want to just try adding the e-mail column and populating it from the the aspnet_membership table.
Passwords are only kept (hashed) in the aspnet_membership table.
sonapappu
Member
680 Points
136 Posts
Re: User Accounts is currently unavailable
Jun 18, 2005 11:30 AM|LINK
Thank you for the helpful sql (s) to clean up the extra rows in user tables. I am able to see the User accounts now.
However, I have been getting this problem in 3.1.0, I didnt see anyone else reporting it in 3.1.0
My dnn_Version table looks like this, which I suppose indicates that the upgrades worked fine.
1 3 0 12 3/20/2005 8:58:36 AM
2 3 0 13 6/10/2005 6:28:41 AM
3 3 1 0 6/10/2005 6:28:43 AM
However I dont think the problem of registering new users has been resolved.
Any idea how to do that ?
Thanks
klevereblog
Member
265 Points
53 Posts
Re: User Accounts is currently unavailable
Jun 18, 2005 12:49 PM|LINK
Hosting Evangelist - CSNA (US)
Developer & Platform Evangelism Group
Blog: http://blogs.msdn.com/klevereblog
This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subj
sonapappu
Member
680 Points
136 Posts
Re: User Accounts is currently unavailable
Jun 18, 2005 03:19 PM|LINK
I used the cursor given below, which fixed the error on the user accounts page. However I still cant register new users. I also tried to change to Administrator account under site settings to some other account other than administrator account as specified by "Michael Washington" in this thread.
I still could not register new users.
Oh, btw , I am using a 3.0.12 upgraded to 3.1.0
Any help is greatly appreciated.
Thanks
--RUN FIRST TO SEE DISCREPANCIES
select * from aspnet_Users au left outer join Users u on au.UserName = U.UserName where U.UserName is null
-- RUN NEXT
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
CybrEnergy
Member
381 Points
94 Posts
Re: User Accounts is currently unavailable
Jun 20, 2005 06:31 PM|LINK
I ran the SQL scripts above and found a few records that were out of sync. When I run the "step 2", the clean up procedure, I get these results:
(1 row(s) affected)
(0 row(s) affected)
(0 row(s) affected)
(1 row(s) affected)
(1 row(s) affected)
(0 row(s) affected)
(0 row(s) affected)
(1 row(s) affected)
Server: Msg 512, Level 16, State 1, Line 21
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
The statement has been terminated.
(0 row(s) affected)
(0 row(s) affected)
Server: Msg 547, Level 16, State 1, Line 32
DELETE statement conflicted with COLUMN REFERENCE constraint 'FK__aspnet_Membership_Users'. The conflict occurred in database 'kitchweb', table 'aspnet_Membership', column 'UserId'.
The statement has been terminated.
Server: Msg 512, Level 16, State 1, Line 21
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
The statement has been terminated.
(0 row(s) affected)
(0 row(s) affected)
Server: Msg 547, Level 16, State 1, Line 32
DELETE statement conflicted with COLUMN REFERENCE constraint 'FK__aspnet_Membership_Users'. The conflict occurred in database 'kitchweb', table 'aspnet_Membership', column 'UserId'.
The statement has been terminated.
Server: Msg 512, Level 16, State 1, Line 21
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
The statement has been terminated.
(0 row(s) affected)
(0 row(s) affected)
Server: Msg 547, Level 16, State 1, Line 32
DELETE statement conflicted with COLUMN REFERENCE constraint 'FK__aspnet_Membership_Users'. The conflict occurred in database 'kitchweb', table 'aspnet_Membership', column 'UserId'.
The statement has been terminated.
Server: Msg 512, Level 16, State 1, Line 21
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
The statement has been terminated.
(0 row(s) affected)
(0 row(s) affected)
Server: Msg 547, Level 16, State 1, Line 32
DELETE statement conflicted with COLUMN REFERENCE constraint 'FK__aspnet_Membership_Users'. The conflict occurred in database 'kitchweb', table 'aspnet_Membership', column 'UserId'.
The statement has been terminated.
(1 row(s) affected)
(0 row(s) affected)
(0 row(s) affected)
(1 row(s) affected)
Server: Msg 512, Level 16, State 1, Line 21
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
The statement has been terminated.
(0 row(s) affected)
(0 row(s) affected)
Server: Msg 547, Level 16, State 1, Line 32
DELETE statement conflicted with COLUMN REFERENCE constraint 'FK__aspnet_Membership_Users'. The conflict occurred in database 'kitchweb', table 'aspnet_Membership', column 'UserId'.
The statement has been terminated.
Server: Msg 512, Level 16, State 1, Line 21
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
The statement has been terminated.
(0 row(s) affected)
(0 row(s) affected)
Server: Msg 547, Level 16, State 1, Line 32
DELETE statement conflicted with COLUMN REFERENCE constraint 'FK__aspnet_Membership_Users'. The conflict occurred in database 'kitchweb', table 'aspnet_Membership', column 'UserId'.
The statement has been terminated.
Server: Msg 512, Level 16, State 1, Line 21
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
The statement has been terminated.
(0 row(s) affected)
(0 row(s) affected)
Server: Msg 547, Level 16, State 1, Line 32
DELETE statement conflicted with COLUMN REFERENCE constraint 'FK__aspnet_Membership_Users'. The conflict occurred in database 'kitchweb', table 'aspnet_Membership', column 'UserId'.
The statement has been terminated.
It did seem that the # of matching results from step 1 went from 10 to 7, but it's odd that there were errors, right?