<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>DotNetNuke</title><link>http://www.dotnetnuke.com/tabid/795/Default.aspx</link><description>Discussions of DotNetNuke for ASP.NET 1.x and above.  &lt;a href="http://www.dotnetnuke.com/" target="_blank"&gt;DNN Home&lt;/a&gt; &lt;a href="http://aspadvice.com/SignUp/list.aspx?l=105&amp;c=25" target="_blank"&gt;Email List&lt;/a&gt;</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: User Accounts is currently unavailable</title><link>http://forums.asp.net/thread/1161322.aspx</link><pubDate>Fri, 06 Jan 2006 18:56:32 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1161322</guid><dc:creator>J7Mitch</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1161322.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=90&amp;PostID=1161322</wfw:commentRss><description>Try clicking on the checkbox that says "Run as Script", that may help if you are getting an error when trying to run it in the Host&amp;gt;SQL window.</description></item><item><title>Re: User Accounts is currently unavailable</title><link>http://forums.asp.net/thread/1161223.aspx</link><pubDate>Fri, 06 Jan 2006 17:31:18 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1161223</guid><dc:creator>remc0</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1161223.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=90&amp;PostID=1161223</wfw:commentRss><description>&lt;p&gt;Hi Tim,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I also have troubles with it.&lt;/p&gt;
&lt;p&gt;I think it's a major bug.&lt;/p&gt;
&lt;p&gt;It appeared when I upgraded to 4.0&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I don't know much about SQL, but when I run the query through the sql manager&amp;nbsp;it produced the same error.&lt;/p&gt;
&lt;p&gt;When I run the query through the Query Analyzer it went OK.&lt;/p&gt;
&lt;p&gt;I don't know why this is, but maybe you could try it.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;With regards,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Remco.&lt;/p&gt;</description></item><item><title>Re: User Accounts is currently unavailable</title><link>http://forums.asp.net/thread/1160751.aspx</link><pubDate>Fri, 06 Jan 2006 06:24:04 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1160751</guid><dc:creator>jeewun</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1160751.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=90&amp;PostID=1160751</wfw:commentRss><description>&lt;p&gt;Hey everyone,&lt;/p&gt;
&lt;p&gt;Hmmm, okay so it sounds like I'm having the same problem as everyone else here.&amp;nbsp; I got the following error when clicking on Admin --&amp;gt; User Accounts on a DNN 3.1.0 install....&lt;/p&gt;
&lt;p&gt;&lt;span class=Normal id=dnn_ctr354__ctl0_lblMessage&gt;&lt;font color=#ff0000&gt;DotNetNuke.Services.Exceptions.ModuleLoadException: Object reference not set to an instance of an object. ---&amp;gt; System.NullReferenceException: Object reference not set to an instance of an object. at _ASP.Users_ascx.__DataBind__control19(Object sender, EventArgs e) at System.Web.UI.Control.OnDataBinding(EventArgs e) at System.Web.UI.Control.DataBind() at System.Web.UI.Control.DataBind() 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) at DotNetNuke.Modules.Admin.Users.UserAccounts.Page_Load(Object sender, EventArgs e) --- End of inner exception stack trace ---&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=Normal&gt;&lt;font color=#000000&gt;I tried doing the running the SQL suggested...&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=Normal&gt;&lt;font color=#ff1493&gt;select * from aspnet_Users au left outer join Users u on au.UserName = U.UserName where U.UserName is null&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=Normal&gt;By going to Host --&amp;gt; SQL paste into box and click "Execute".&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=Normal&gt;I indeed get 4 records returned.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=Normal&gt;So, I tried pasting the rest of the SQL in Host --&amp;gt; SQL and clicked "Execute".&lt;/span&gt;&lt;/p&gt;&lt;span class=Normal&gt;
&lt;p&gt;&lt;font color=#0000ff&gt;DECLARE @UserName varchar (50)&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color=#0000ff&gt;--get a cursor to hold all the orphaned users&lt;br /&gt;--that are in aspnet_Users table that are not in the DNN Users table&lt;br /&gt;DECLARE users_cursor CURSOR FOR&lt;br /&gt;SELECT au.UserName FROM aspnet_Users au &lt;br /&gt;LEFT OUTER JOIN Users u on au.UserName = U.UserName &lt;br /&gt;WHERE U.UserName is null&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color=#0000ff&gt;OPEN users_cursor&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color=#0000ff&gt;-- Perform the first fetch.&lt;br /&gt;FETCH NEXT FROM users_cursor INTO @UserName&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color=#0000ff&gt;-- Check @@FETCH_STATUS to see if there are any more rows to fetch.&lt;br /&gt;WHILE @@FETCH_STATUS = 0&lt;br /&gt;BEGIN&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; --delete the user from all the aspnet_* tables that it may be in&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; --one at a time to avoid referrential integrity constraints&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; delete aspnet_Membership where UserId = &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (select am.UserId from aspnet_Membership am inner join aspnet_Users au on am.UserId = au.UserId&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where au.Username &lt;/font&gt;&lt;a href="mailto:=@UserName"&gt;&lt;font color=#0000ff&gt;=@UserName&lt;/font&gt;&lt;/a&gt;&lt;font color=#0000ff&gt;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; delete aspnet_Profile where UserId = &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (select ap.UserId from aspnet_Profile ap inner join aspnet_Users au on ap.UserId = au.UserId&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where au.Username &lt;/font&gt;&lt;a href="mailto:=@UserName"&gt;&lt;font color=#0000ff&gt;=@UserName&lt;/font&gt;&lt;/a&gt;&lt;font color=#0000ff&gt;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; delete aspnet_UsersInRoles where UserId &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; in (select uir.UserId from aspnet_UsersInRoles uir inner join aspnet_Users au on uir.UserId = au.UserId&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where au.Username &lt;/font&gt;&lt;a href="mailto:=@UserName"&gt;&lt;font color=#0000ff&gt;=@UserName&lt;/font&gt;&lt;/a&gt;&lt;font color=#0000ff&gt;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; delete from aspnet_Users where Username &lt;/font&gt;&lt;a href="mailto:=@UserName"&gt;&lt;font color=#0000ff&gt;=@UserName&lt;/font&gt;&lt;/a&gt;&lt;font color=#0000ff&gt;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FETCH NEXT FROM users_cursor INTO @UserName&lt;br /&gt;END&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color=#0000ff&gt;CLOSE users_cursor&lt;br /&gt;DEALLOCATE users_cursor&lt;br /&gt;GO&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;What I got was the following....&lt;/p&gt;
&lt;p&gt;&lt;font color=#ff0000&gt;&lt;strong&gt;&lt;span class=NormalRed id=dnn_ctr325_SQL_lblMessage&gt;There is an error in your query!&lt;/span&gt; &lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color=#000000&gt;I don't know if there is an error in my query or not, I'm just copying and pasting what's above in Blue...I'm not an SQL wizard by any means.&amp;nbsp; Any suggestions anyone?&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;Many thanks!&lt;/p&gt;
&lt;p&gt;-Tim&lt;/p&gt;&lt;/span&gt;</description></item><item><title>Re: User Accounts is currently unavailable</title><link>http://forums.asp.net/thread/1137655.aspx</link><pubDate>Fri, 09 Dec 2005 20:02:14 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1137655</guid><dc:creator>rfreese</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1137655.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=90&amp;PostID=1137655</wfw:commentRss><description>&lt;p&gt;Just wanted to add my thanks for this proc - I managed to get a more or less clean install of 3.2 into this unsync condition and (with a little doctoring) this script saved me from starting clean again.&lt;/p&gt;
&lt;p&gt;I admit to fiddling with the "is_superuser" flag while trying to hack my way out of some other trouble, so I don't know if I can duplicate it.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Roberta&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/default/images/icon-quote.gif"&gt; &lt;strong&gt;J7Mitch wrote:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;/p&gt;
&lt;p&gt;This error seems to happen fairly often on this release (3.0.13)&amp;nbsp;and is related to getting the users in the aspnet_* tables out of sync with the users in the DNN Users table&lt;/p&gt;
&lt;p&gt;This can happen if you try to add a user but it fails because of constraints like password length. This should roll back better in the next release but if you find yourself in this situation and wan't to try and fix it then the following SQL may help.&amp;nbsp; Warning: Use this SQL at your own risk and after backing up your DB, I have ran it successfully more than once, but you never know. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;First run this to see if the tables are out of Sync:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;select * from aspnet_Users au left outer join Users u on au.UserName = U.UserName where U.UserName is null&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;If that returns records then you can remove them by running this:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;DECLARE @UserName varchar (50)&lt;/p&gt;
&lt;p&gt;--get a cursor to hold all the orphaned users&lt;br /&gt;--that are in aspnet_Users table that are not in the DNN Users table&lt;br /&gt;DECLARE users_cursor CURSOR FOR&lt;br /&gt;SELECT au.UserName FROM aspnet_Users au &lt;br /&gt;LEFT OUTER JOIN Users u on au.UserName = U.UserName &lt;br /&gt;WHERE U.UserName is null&lt;/p&gt;
&lt;p&gt;OPEN users_cursor&lt;/p&gt;
&lt;p&gt;-- Perform the first fetch.&lt;br /&gt;FETCH NEXT FROM users_cursor INTO @UserName&lt;/p&gt;
&lt;p&gt;-- Check @@FETCH_STATUS to see if there are any more rows to fetch.&lt;br /&gt;WHILE @@FETCH_STATUS = 0&lt;br /&gt;BEGIN&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; --delete the user from all the aspnet_* tables that it may be in&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; --one at a time to avoid referrential integrity constraints&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; delete aspnet_Membership where UserId = &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (select am.UserId from aspnet_Membership am inner join aspnet_Users au on am.UserId = au.UserId&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where au.Username &lt;a href="mailto:=@UserName"&gt;=@UserName&lt;/a&gt;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; delete aspnet_Profile where UserId = &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (select ap.UserId from aspnet_Profile ap inner join aspnet_Users au on ap.UserId = au.UserId&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where au.Username &lt;a href="mailto:=@UserName"&gt;=@UserName&lt;/a&gt;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; delete aspnet_UsersInRoles where UserId &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; in (select uir.UserId from aspnet_UsersInRoles uir inner join aspnet_Users au on uir.UserId = au.UserId&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where au.Username &lt;a href="mailto:=@UserName"&gt;=@UserName&lt;/a&gt;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; delete from aspnet_Users where Username &lt;a href="mailto:=@UserName"&gt;=@UserName&lt;/a&gt;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FETCH NEXT FROM users_cursor INTO @UserName&lt;br /&gt;END&lt;/p&gt;
&lt;p&gt;CLOSE users_cursor&lt;br /&gt;DEALLOCATE users_cursor&lt;br /&gt;GO&lt;/p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;</description></item><item><title>Re: User Accounts is currently unavailable</title><link>http://forums.asp.net/thread/1123975.aspx</link><pubDate>Fri, 25 Nov 2005 21:50:08 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1123975</guid><dc:creator>Priest_Merchant</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1123975.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=90&amp;PostID=1123975</wfw:commentRss><description>&lt;P class=MsoNormal&gt;&lt;FONT face="Book Antiqua"&gt;Thanks Mitch,&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;FONT face="Book Antiqua"&gt;I started getting the error after a new user tried to register.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;I used your solution (running the first part to identify which user(s) caused the issue) and it worked great.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;I then went back in and registered (as a test) and everything worked just fine. &lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Thanks again.&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;[Error: User Accounts is currently unavailable.&lt;BR&gt;DotNetNuke.Services.Exceptions.ModuleLoadException: Object reference not set to an instance of an object. ---&amp;gt; System.NullReferenceException: Object reference not set to an instance of an object. at _ASP.Users_ascx.__DataBind__control19(Object sender, EventArgs e) at System.Web.UI.Control.OnDataBinding(EventArgs e) at System.Web.UI.Control.DataBind() at System.Web.UI.Control.DataBind() 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) at DotNetNuke.Modules.Admin.Users.UserAccounts.Page_Load(Object sender, EventArgs e) --- End of inner exception stack trace ---]&lt;/FONT&gt;&lt;/P&gt;</description></item><item><title>Re: User Accounts is currently unavailable</title><link>http://forums.asp.net/thread/1106174.aspx</link><pubDate>Tue, 08 Nov 2005 18:34:19 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1106174</guid><dc:creator>razorphreak</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1106174.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=90&amp;PostID=1106174</wfw:commentRss><description>then you'll have to remove them manually.&amp;nbsp; odd the script didn't
help as it should have.&amp;nbsp; you might have some usernames that are
really messed up and not entered in properly.&amp;nbsp; You'll have to
remove it one at a time and remove the FK constraints before you can
remove the actual user record (typically the profile entry, the role
entry, user in role entry, and then the user entry).&lt;br&gt;</description></item><item><title>Re: User Accounts is currently unavailable</title><link>http://forums.asp.net/thread/1106129.aspx</link><pubDate>Tue, 08 Nov 2005 18:10:55 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1106129</guid><dc:creator>DanaNield</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1106129.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=90&amp;PostID=1106129</wfw:commentRss><description>Thanks again, but no joy on that updated statement. The number of records in the tables didn't change.&lt;BR&gt;&lt;BR&gt;Found one name out of sync but when I attempted to delete it from the aspnet_users table after deleting it from the other tables, I got an FK constraint error...&lt;BR&gt;&lt;BR&gt;</description></item><item><title>Re: User Accounts is currently unavailable</title><link>http://forums.asp.net/thread/1106012.aspx</link><pubDate>Tue, 08 Nov 2005 16:46:17 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1106012</guid><dc:creator>razorphreak</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1106012.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=90&amp;PostID=1106012</wfw:commentRss><description>The problem you are describing along with the error screen is still a
matter of duplicates in the membership tables that do not exist in the
Users table.&amp;nbsp; If a username is part of multiple portals, it will
appear more than once in the membership tables as well.&amp;nbsp; After
running the SQL script to clear out the duplicates, you'll have to look
up usernames that exist in membership table and not in the Users table
and manually remove them.&amp;nbsp; Typically that means removing the
profile entry, the roles entries, and then the user entry itself.&lt;br&gt;
&lt;br&gt;
When I looked at this again, the deletes in the SQL script can be
changed to the following and should remove all duplicate entries:&lt;br&gt;
&lt;br&gt;
&lt;font color="#0000ff" face="Arial" size="2"&gt;&lt;span class="789065814-14102005"&gt;&lt;font color="#000000"&gt;&lt;font color="#0000ff"&gt;delete aspnet_Membership where UserId 
&lt;strong&gt;&lt;u&gt;IN&lt;/u&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/font&gt; 
&lt;p class="MsoNormal"&gt;&lt;font face="Arial" size="2"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (select distinct am.UserId 
from aspnet_Membership am inner join aspnet_Users au on am.UserId = 
au.UserId&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;font face="Arial" size="2"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where au.Username 
=@UserName)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;font face="Arial" size="2"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; delete 
aspnet_Profile where UserId&amp;nbsp;&lt;span class="789065814-14102005"&gt;&lt;strong&gt;&lt;u&gt;IN&lt;/u&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;font face="Arial" size="2"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (select distinct ap.UserId 
from aspnet_Profile ap inner join aspnet_Users au on ap.UserId = 
au.UserId&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;font face="Arial" size="2"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where au.Username 
=@UserName)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;font face="Arial" size="2"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; delete aspnet_UsersInRoles where 
UserId &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;font face="Arial" size="2"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; in (select distinct 
uir.UserId from aspnet_UsersInRoles uir inner join aspnet_Users au on uir.UserId 
= au.UserId&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;font face="Arial" size="2"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where au.Username 
=@UserName)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;/span&gt;&lt;/font&gt;Try that and see what happens.&lt;br&gt;
&lt;br&gt;</description></item><item><title>Re: User Accounts is currently unavailable</title><link>http://forums.asp.net/thread/1105897.aspx</link><pubDate>Tue, 08 Nov 2005 15:40:55 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1105897</guid><dc:creator>DanaNield</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1105897.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=90&amp;PostID=1105897</wfw:commentRss><description>&lt;P&gt;Thanks for the help so far, but I'm still out of luck.&lt;/P&gt;
&lt;P&gt;More details:&lt;/P&gt;
&lt;P&gt;When I attempt to view more than ten members in user accounts I get the following error:&lt;/P&gt;
&lt;P&gt;
&lt;TABLE cellSpacing=0 cellPadding=0&gt;

&lt;TR class=Exception&gt;
&lt;TD&gt;&lt;SPAN class=Normal&gt;&amp;nbsp; &lt;SPAN id=dnn_ctr332_LogViewer_dlLog__ctl1_lblDate&gt;11/8/2005 7:37:57 AM&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class=Normal&gt;&amp;nbsp; &lt;SPAN id=dnn_ctr332_LogViewer_dlLog__ctl1_lblType&gt;Page Load Exception&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class=Normal&gt;&amp;nbsp; &lt;SPAN id=dnn_ctr332_LogViewer_dlLog__ctl1_lblUserName&gt;host&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class=Normal&gt;&amp;nbsp; &lt;SPAN id=dnn_ctr332_LogViewer_dlLog__ctl1_lblPortal&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=Normal&gt;&amp;nbsp; &lt;SPAN id=dnn_ctr332_LogViewer_dlLog__ctl1_lblSummary&gt;&lt;B&gt;AssemblyVersion&lt;/B&gt;: 03.01.01;&amp;nbsp;&lt;B&gt;Method&lt;/B&gt;: ASP.Users_ascx.__Data&lt;/SPAN&gt;&amp;nbsp;...&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;
&lt;TR id=d2a1d36b-dd60-4069-a607-283d38152a29&gt;
&lt;TD colSpan=2&gt;
&lt;TABLE cellSpacing=1 cellPadding=5 bgColor=#000000&gt;

&lt;TR&gt;
&lt;TD&gt;&lt;SPAN class=Normal id=dnn_ctr332_LogViewer_dlLog__ctl1_lblException&gt;&lt;B&gt;AssemblyVersion&lt;/B&gt;: 03.01.01&lt;BR&gt;&lt;B&gt;Method&lt;/B&gt;: ASP.Users_ascx.__DataBind__control19&lt;BR&gt;&lt;B&gt;FileName&lt;/B&gt;: &lt;BR&gt;&lt;B&gt;FileLineNumber&lt;/B&gt;: 0&lt;BR&gt;&lt;B&gt;FileColumnNumber&lt;/B&gt;: 0&lt;BR&gt;&lt;B&gt;PortalID&lt;/B&gt;: 0&lt;BR&gt;&lt;B&gt;PortalName&lt;/B&gt;: AMPS&lt;BR&gt;&lt;B&gt;UserID&lt;/B&gt;: 2&lt;BR&gt;&lt;B&gt;UserName&lt;/B&gt;: host&lt;BR&gt;&lt;B&gt;ActiveTabID&lt;/B&gt;: 11&lt;BR&gt;&lt;B&gt;ActiveTabName&lt;/B&gt;: User Accounts&lt;BR&gt;&lt;B&gt;AbsoluteURL&lt;/B&gt;: /dnn/Default.aspx&lt;BR&gt;&lt;B&gt;AbsoluteURLReferrer&lt;/B&gt;: http://www.amps-armor.org/dnn/Admin/UserAccounts/tabid/11/Default.aspx&lt;BR&gt;&lt;B&gt;ExceptionGUID&lt;/B&gt;: a4b8a400-fb20-47ca-8654-5c4f1d2f1c00&lt;BR&gt;&lt;B&gt;DefaultDataProvider&lt;/B&gt;: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider&lt;BR&gt;&lt;B&gt;InnerException&lt;/B&gt;: Object reference not set to an instance of an object.&lt;BR&gt;&lt;B&gt;Message&lt;/B&gt;: DotNetNuke.Services.Exceptions.PageLoadException: Object reference not set to an instance of an object. ---&amp;gt; System.NullReferenceException: Object reference not set to an instance of an object. at ASP.Users_ascx.__DataBind__control19(Object sender, EventArgs e) at System.Web.UI.Control.OnDataBinding(EventArgs e) at System.Web.UI.Control.DataBind() at System.Web.UI.Control.DataBind() 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) at DotNetNuke.Modules.Admin.Users.UserAccounts.ddlRecordsPerPage_SelectedIndexChanged(Object sender, EventArgs e) at System.Web.UI.WebControls.ListControl.OnSelectedIndexChanged(EventArgs e) at System.Web.UI.WebControls.DropDownList.System.Web.UI.IPostBackDataHandler.RaisePostDataChangedEvent() at System.Web.UI.Page.RaiseChangedEvents() at System.Web.UI.Page.ProcessRequestMain() --- End of inner exception stack trace ---&lt;BR&gt;&lt;B&gt;StackTrace&lt;/B&gt;: &lt;BR&gt;&lt;B&gt;Source&lt;/B&gt;: &lt;BR&gt;&lt;B&gt;Server Name&lt;/B&gt;: DEDI421&lt;BR&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TABLE&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TABLE&gt;&lt;/P&gt;I checked the tables and there are 609 rows in the aspnet_user&amp;nbsp;and 388 in the User. There are also duplicates in the aspnet_user tables. This can't be right.&lt;BR&gt;&lt;BR&gt;Dana&lt;BR&gt;&lt;BR&gt;</description></item><item><title>Re: User Accounts is currently unavailable</title><link>http://forums.asp.net/thread/1099494.aspx</link><pubDate>Tue, 01 Nov 2005 16:40:07 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1099494</guid><dc:creator>razorphreak</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1099494.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=90&amp;PostID=1099494</wfw:commentRss><description>It goes back to the SQL script in this thread.&amp;nbsp; That will remove
the out of sync users (users that exist in membership tables but not in
the older DNN ones).&amp;nbsp; That's what will clean out the membership
tables but to prevent it there are a few issues you got to be aware of:&lt;br&gt;
&lt;ol&gt;
  &lt;li&gt;check for that password field in the Users table; if you still
have it there and its still requiring a non-null value, you'll have to
update the table manually to allow a null for the password.&lt;/li&gt;
  &lt;li&gt;there seems to be a bug in which if you delete a user, you delete
them from the Users table which creates a out of sync senario.&amp;nbsp;
I'm still waiting on a fixed or not in 3.1.1 though.&lt;br&gt;
  &lt;/li&gt;
  &lt;li&gt;there also seems to be an issue if you remove a portal, all users
are hence deleted from the Users table again.&amp;nbsp; Again not sure if
it was fixed in 3.1.1.&lt;br&gt;
  &lt;/li&gt;
&lt;/ol&gt;
&lt;br&gt;</description></item><item><title>Re: User Accounts is currently unavailable</title><link>http://forums.asp.net/thread/1099444.aspx</link><pubDate>Tue, 01 Nov 2005 15:57:37 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1099444</guid><dc:creator>DanaNield</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1099444.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=90&amp;PostID=1099444</wfw:commentRss><description>Thanks for that.&lt;BR&gt;&lt;BR&gt;I checked the aspnet_membership table and found that the unauthorized users that I deleted (Through a 3rd party module, not through DNN's user accounts module, my bad!) were still showing up.&lt;BR&gt;&lt;BR&gt;As my knowledge of the aspnet_ tables isn't that great, could someone provide an example script that would bring balance to these tables? I've backed up my DB but I'm fearful of making the dogs breakfast out of it.&lt;BR&gt;&lt;BR&gt;Dana&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;</description></item><item><title>Re: User Accounts is currently unavailable</title><link>http://forums.asp.net/thread/1099330.aspx</link><pubDate>Tue, 01 Nov 2005 14:37:45 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1099330</guid><dc:creator>razorphreak</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1099330.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=90&amp;PostID=1099330</wfw:commentRss><description>I too have had this issue.&amp;nbsp; The problem revolves around the
membership tables.&amp;nbsp; What you have to accomplish is after you've
sync'ed the users, the invalid usernames you'll have to completely
remove from the membership tables as well, not just the old Users table.&lt;br&gt;
&lt;br&gt;
Be aware also that what I would suggest doing is in the Users table,
mark the Password field to allow a NULL value - reason behind this is
the stored procedures are still attempting to update this table which
cannot happen due to no password being fed to the table.&amp;nbsp; I can't
say if your install kept the password field on the Users table but mine
did and I had to make that adjustment.&amp;nbsp; This might be the reason
your users kept going out of sync is because an error is thrown on the
procedure that adds the users to the older Users tables (Users,
UserPortals, UserRoles).&amp;nbsp; &lt;br&gt;
&lt;br&gt;
I've noticed that even though I've logged a call for this issue, still
not assigned?&amp;nbsp; On this issue I believe I've found another problem
regarding assignment to roles in the membership tables only; when
attempting to add a user to a role at times various usernames aren't
updating.&amp;nbsp; They do in the UserRoles table as if you edit the user
directly and look at his/her role, it will show properly however it
does not in the security roles.&amp;nbsp; &lt;br&gt;
&lt;br&gt;</description></item><item><title>Re: User Accounts is currently unavailable</title><link>http://forums.asp.net/thread/1098909.aspx</link><pubDate>Tue, 01 Nov 2005 03:09:25 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1098909</guid><dc:creator>DanaNield</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1098909.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=90&amp;PostID=1098909</wfw:commentRss><description>&lt;P&gt;Hi Folks,&lt;/P&gt;
&lt;P&gt;I recently upgraded a DNN site from 2.1.2 to 3.1.1 and I received an email from someone attempting to register today. He received this message:&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=Normal id=dnn_ctr-1__ctl0_lblMessage&gt;&lt;EM&gt;The username specified is invalid. Please specify a valid username.&lt;BR&gt;&lt;BR&gt;&lt;/EM&gt;1. I spent the day deleting users in mass. Our site is for paid members and the majority of unapproved accounts were from non-members.&lt;BR&gt;2. I had several&amp;nbsp;a child portal with members when the site was 2.1.2. I did delete several of them.&lt;BR&gt;3. I've run the SQL queries posted earlier with no errors and no change. New Users still get the above message.&lt;BR&gt;&lt;BR&gt;Any help would be greatly appreciated.&lt;BR&gt;&lt;BR&gt;Dana&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;&lt;/SPAN&gt;&lt;/P&gt;</description></item><item><title>Re: User Accounts is currently unavailable</title><link>http://forums.asp.net/thread/1085162.aspx</link><pubDate>Mon, 17 Oct 2005 15:10:16 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1085162</guid><dc:creator>razorphreak</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1085162.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=90&amp;PostID=1085162</wfw:commentRss><description>I think I've got it down right on issue DNNP-2045.&amp;nbsp; I'm also noticing issues assigning users to roles.&lt;br&gt;</description></item><item><title>Re: User Accounts is currently unavailable</title><link>http://forums.asp.net/thread/1083605.aspx</link><pubDate>Fri, 14 Oct 2005 23:08:50 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1083605</guid><dc:creator>J7Mitch</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1083605.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=90&amp;PostID=1083605</wfw:commentRss><description>&lt;BLOCKQUOTE&gt;&lt;table width="85%"&gt;&lt;tr&gt;&lt;td class="txt4"&gt;&lt;img src="/Themes/default/images/icon-quote.gif"&gt;&amp;nbsp;&lt;strong&gt;razorphreak wrote:&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="quoteTable"&gt;&lt;table width="100%"&gt;&lt;tr&gt;&lt;td width="100%" valign="top" class="txt4"&gt;But this isn't the bug...&lt;BR&gt;&lt;BR&gt;The bug is if you are deleted from a portal you are deleted from everything.&amp;nbsp; If the portal itself is deleted all users within that portal are deleted from the DNN users table.&amp;nbsp; The probelm is however they are NOT deleted from the membership ones.&amp;nbsp; What this creates is out of sync users who must be cleared from the membership tables BEFORE they can ever become a user in membership again.&amp;nbsp; This was not resolved around 3.1.0 and I'm wondering was it in 3.1.1.&amp;nbsp; This is an issue because we are having this very problem now.&lt;BR&gt;&lt;BR&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/BLOCKQUOTE&gt;&lt;BR&gt;&lt;BR&gt;The bug in this thread is what I have been talking about.&lt;BR&gt;I hadn't heard of the one you are talking about, has it been logged?&amp;nbsp; http://support.dotnetnuke.com&lt;BR&gt;</description></item></channel></rss>