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 ...Requirements for DNN 4.4.1 and 4.5.1 Requirements for DNN 4.4.1 and 4.5.1
Previous
 
Next
New Post
12/9/2007 11:43 AM
 


Found the problem.  There were some views left behind from when I gutted the database; so the database install scripts blew up when executed.  (I think they were the views for the aspnet provider.

I'm attempting to upgrade a DNN3.2.2 version to 4.7.  I had an older database (pre 3.2.2) sitting on my hosting company's database server.  (we have two databases so we could roll back in case 3.2.2 install went bad.)  So, I cleared it out, but left, by accident, the views.  (oh, well, my  bad).

Now, I have some users to import.  DNN re wrote with my machineKey and decription key; so now I have Host and Admin in my new database and need to import the 3.2.2 users. 

Here is my approach.   (I'm close, but I'm still missing something.)

  • Run a Wipe out all the new user information setup by the new database scripts.
    • delete
  • Since the aspnet schema hasn't changed, Re-populate the tables from the old database (DRAFTCC3) into the new.  (NOTE: there are new columns inside the DNN tables, so I populated them with null values or somehing I thought it could/should be.  Also note that the older aspnet_Applications table did not have 'dotnetnuke' as the application name, it had two applications called '0' and '-1'.  I'm suspect that those are for the Host and the first portal administrator.  Host, I don't think should have the same ApplicationID, but the Admin will have the same as all the usrs.  Here's the script to import:
  • from users
    delete from dbo.aspnet_Membership
    delete from aspnet_Profile
    delete from aspnet_UsersInRoles
    delete from dbo.aspnet_Users
    delete from aspnet_Roles
    delete from aspnet_Applications

INSERT

INTO aspnet_Applications (ApplicationName, LoweredApplicationName, ApplicationId, Description)(select ApplicationName, LoweredApplicationName, ApplicationId, Description from DRAFTCC3.dbo.aspnet_Applications)

INSERT

INTO dbo.aspnet_Users(ApplicationId, UserId, UserName, LoweredUserName, MobileAlias, IsAnonymous, LastActivityDate)(SELECT ApplicationId, UserId, UserName, LoweredUserName, MobileAlias, IsAnonymous, LastActivityDate FROM DRAFTCC3.dbo.aspnet_Users)

INSERT

INTO dbo.aspnet_Profile (UserId, PropertyNames, PropertyValuesString, PropertyValuesBinary, LastUpdatedDate(SELECT UserId, PropertyNames, PropertyValuesString, PropertyValuesBinary, LastUpdatedDate FROM DRAFTCC3.dbo.aspnet_Profile)

INSERT

INTO dbo.aspnet_Roles(ApplicationId, RoleId, RoleName, LoweredRoleName, Description)(SELECT ApplicationId, RoleId, RoleName, LoweredRoleName, Description FROM DRAFTCC3.dbo.aspnet_Roles)

INSERT

INTO aspnet_UsersInRoles (UserId, RoleId )(SELECT UserId, RoleId FROM DRAFTCC3.DBO.aspnet_UsersInRoles)

INSERT

(

GO

INTO dbo.aspnet_Membership(ApplicationId, UserId, Password, PasswordFormat, PasswordSalt, MobilePIN, Email, LoweredEmail, PasswordQuestion, PasswordAnswer, IsApproved, IsLockedOut, CreateDate, LastLoginDate, LastPasswordChangedDate, LastLockoutDate, FailedPasswordAttemptCount, FailedPasswordAttemptWindowStart, FailedPasswordAnswerAttemptCount, FailedPasswordAnswerAttemptWindowStart, Comment )SELECT ApplicationId, UserId, Password, PasswordFormat, PasswordSalt, MobilePIN, Email, LoweredEmail, PasswordQuestion, PasswordAnswer, IsApproved, IsLockedOut, CreateDate, LastLoginDate, LastPasswordChangedDate, LastLockoutDate, FailedPasswordAttemptCount, FailedPasswordAttemptWindowStart, FailedPasswordAnswerAttemptCount, FailedPasswordAnswerAttemptWindowStart, Comment FROM DRAFTCC3.dbo.aspnet_Membership)

SET

SET

'0'

SET

identity_insert dbo.UserRoles ON
GO
INSERT INTO dbo.UserRoles ( UserRoleID, UserID, RoleID, ExpiryDate, IsTrialUsed, EffectiveDate)SELECT UserRoleID, UserID, RoleID, ExpiryDate, IsTrialUsed, '12/1/2005 12:00:00' [EffectiveDate] from draftcc3.dbo.UserRoles
GO
SET identity_insert dbo.UserRoles OFF
GO

update
aspnet_Applications set ApplicationName = 'dotnetnuke',LoweredApplicationName = 'dotnetnuke' where applicationname = '0'

Well, the great news is that my users can be found by dbo.GetUserByUsername; but login fails with an exception.  Like I said, I'm SOOOO close!  Here's the exception:

Object reference not set to an instance of an object. <PropertyValue>DotNetNuke.Security.Membership.AspNetMembershipProvider.UserLogin</PropertyValue></LogProperty>
<LogProperty><PropertyName>StackTrace</PropertyName><PropertyValue /></LogProperty>
<LogProperty><PropertyName>Message</PropertyName><PropertyValue>DotNetNuke.Services.Exceptions.PageLoadException: Object reference not set to an instance of an object. ---&gt; System.NullReferenceException: Object reference not set to an instance of an object.     at DotNetNuke.Security.Membership.AspNetMembershipProvider.UserLogin(Int32 portalId, String username, String password, String authType, String verificationCode, UserLoginStatus&amp; loginStatus)     at DotNetNuke.Entities.Users.UserController.ValidateUser(Int32 portalId, String Username, String Password, String authType, String VerificationCode, String PortalName, String IP, UserLoginStatus&amp; loginStatus)     at DotNetNuke.Modules.Admin.Authentication.Login.cmdLogin_Click(Object sender, EventArgs e)     at System.Web.UI.WebControls.Button.OnClick(EventArgs e)     at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)     at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String

Anyone have any ideas?

identity_insert dbo.UserPortals on
GO
insert into UserPortals ( UserId, PortalId, UserPortalId, CreatedDate, Authorised)(select UserId, PortalId, UserPortalId, CreatedDate, 1 [Authorised] from draftcc3.dbo.UserPortals)
GO
SETidentity_insert dbo.UserPortals OFF
GO

SET
identity_insert dbo.Roles on
GO
INSERT INTO dbo.Roles (RoleID, PortalID, RoleName, Description, ServiceFee, BillingFrequency, TrialPeriod, TrialFrequency, BillingPeriod, TrialFee, IsPublic, AutoAssignment, RoleGroupID, RSVPCode, IconFile)(select RoleID, PortalID, RoleName, Description, ServiceFee, BillingFrequency, TrialPeriod, TrialFrequency, BillingPeriod, TrialFee, IsPublic, AutoAssignment, NULL [RoleGroupID], NULL [RSVPCode], NULL [IconFile] from draftcc3.dbo.Roles WHERE ROLEID>2)
GO
SET identity_insert dbo.Roles Off
GO
identity_insert dbo.Users on
GO
INSERT INTO dbo.users (UserID, Username, FirstName, LastName, IsSuperUser, AffiliateId, Email) (select UserID, Username, FirstName, LastName, IsSuperUser, AffiliateId, Email from DRAFTCC3.dbo.users)
GO
SET identity_insert dbo.Users off
GO

 
New Post
12/11/2007 12:44 PM
 

Landango,

I'm having exactly the same error that you are, i'm out of options with my next step being to load up the code in my debug environment (i hate doing that because it always seems to end in dll version /reference issues) so that i can debug through DotNetNuke.Security.Membership.AspNetMembershipProvider and find out what object is nothing.

The interesting thing is that as version 3.3 there were ASPNET auth tables but were only used for host accounts, the site is configured to use an alternate membership provider.  running 4.7 and specifying the custom membership provider, i get this error.  I get the same error when specifying the Aspnetmembership provider...; which makes me feel like the error does not have anything to do with table structures or the data in the auth tables.

I don't recall there being any sql failures durring the upgrade, so i didn't have to do any custom sql work. ( I also put the correct machine key and decryption key into the web.config before initially so that I didn't have the encryption issue you did).

Please contact me at mattchristenson@realskydiving.com so that if either one of us finds a solution to this we can fill the other in.  Perhaps we can brainstorm together.

 
Previous
 
Next
HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...Requirements for DNN 4.4.1 and 4.5.1 Requirements for DNN 4.4.1 and 4.5.1


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