Object reference not set to an instance of an object. at DotNetNuke.Entities.Users.UserInfo.GetProperty

DNN Error Object reference not set to an instance of an object. at DotNetNuke.Entities.Users.UserInfo.GetProperty

After noticing a few strange things with our website, and seeing a number of users requesting access, but not receiving their authentication email. We noticed this error when we manually authorised an account.

Message: 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.Entities.Users.UserInfo.GetProperty(String propertyName, String format, CultureInfo formatProvider, UserInfo accessingUser, Scope currentScope, Boolean& propertyNotFound) at DotNetNuke.Services.Tokens.BaseCustomTokenReplace.replacedTokenValue(String strObjectName, String strPropertyName, String strFormat) at DotNetNuke.Services.Tokens.BaseTokenReplace.ReplaceTokens(String strSourceText) at DotNetNuke.Services.Tokens.TokenReplace.ReplaceTokens(String strSourceText) at DotNetNuke.Services.Tokens.TokenReplace.ReplaceEnvironmentTokens(String strSourceText, IDictionary Custom, String CustomCaption) at DotNetNuke.Services.Localization.Localization.GetSystemMessage(String strLanguage, PortalSettings portalSettings, String messageName, UserInfo userInfo, String resourceFile, ArrayList customArray, IDictionary customDictionary, String customCaption, Int32 accessingUserID) at DotNetNuke.Services.Localization.Localization.GetSystemMessage(String strLanguage, PortalSettings portalSettings, String messageName, UserInfo userInfo, String resourceFile, ArrayList custom, String customCaption, Int32 accessingUserID) at DotNetNuke.Services.Mail.Mail.SendMail(UserInfo user, MessageType msgType, PortalSettings settings) at DotNetNuke.Modules.Admin.Users.ManageUsers.MembershipAuthorized(Object sender, EventArgs e) — End of inner exception stack trace —Message: 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.Entities.Users.UserInfo.GetProperty(String propertyName, String format, CultureInfo formatProvider, UserInfo accessingUser, Scope currentScope, Boolean& propertyNotFound) at DotNetNuke.Services.Tokens.BaseCustomTokenReplace.replacedTokenValue(String strObjectName, String strPropertyName, String strFormat) at DotNetNuke.Services.Tokens.BaseTokenReplace.ReplaceTokens(String strSourceText) at DotNetNuke.Services.Tokens.TokenReplace.ReplaceTokens(String strSourceText) at DotNetNuke.Services.Tokens.TokenReplace.ReplaceEnvironmentTokens(String strSourceText, IDictionary Custom, String CustomCaption) at DotNetNuke.Services.Localization.Localization.GetSystemMessage(String strLanguage, PortalSettings portalSettings, String messageName, UserInfo userInfo, String resourceFile, ArrayList customArray, IDictionary customDictionary, String customCaption, Int32 accessingUserID) at DotNetNuke.Services.Localization.Localization.GetSystemMessage(String strLanguage, PortalSettings portalSettings, String messageName, UserInfo userInfo, String resourceFile, ArrayList custom, String customCaption, Int32 accessingUserID) at DotNetNuke.Services.Mail.Mail.SendMail(UserInfo user, MessageType msgType, PortalSettings settings) at DotNetNuke.Modules.Admin.Users.ManageUsers.MembershipAuthorized(Object sender, EventArgs e) — End of inner exception stack trace —

The account was authorised, but DNN threw this error.

The error was traced back to the token function of the automatic email messages in DotNetNuke. Email messages were not being generated, and no users were being authorised. 

The long and the short of it was that the defined Administrator account was inadvertently removed from the site. This in turn stopped DNN from being able to generate any email messages with tokens for the Admin account email address.

The fix

was as easy as putting an admin account back into the site.

Posted by InteractiveWebs

This blog is the combined blog work of the InteractiveWebs Dev Team. Together we work on a range of DotNetNuke (DNN) applications, modules, Silverlight, and Microsoft CRM Portal integration products. Our Business is website design and hosting, with a strong focus on DotNetNuke, Microsoft Dynamics CRM, Silverlight and iPhone iPad development.

4 comments

Hi,

If anybody is still active in this topic , I face the similar problem. I also have admin acount already setup but still receive the same error on adding/deleting users.

Thanks
Kulwinder

InteractiveWebs

Check the email settings defined for that user, and the SMTP settings for the site.

Hi

Thanks,

By email settings, do you mean email id for the admin or any other settings?

SMTP Settings in the HOST settings.

Leave a Reply