Issue
You are upgrading from an earlier version of DNN to DNN 7 or above and find yourself unable to login after the update. This issue will generally log one of the following entries into the
DNN Event Log, but this may not always be the case:
Method = DotNetNuke.Entities.Users.UserController.GetUserCountByPortalCallBack
Message = System.NullReferenceException: Object reference not set to an instance of an object.
at DotNetNuke.Entities.Users.UserController.GetUserCountByPortalCallBack(CacheItemArgs cacheItemArgs)
at DotNetNuke.Common.Utilities.DataCache.GetCachedDataFromRuntimeCache(CacheItemArgs cacheItemArgs, CacheItemExpiredCallback cacheItemExpired)
Or
Message: System.ArgumentException: Parameter count does not match Parameter Value count.
Cause
With DNN 7, the ASPnetMembership Provider gets moved from the DotNetNuke.Provider.AspNetProvider.dll assembly into the main DotNetNuke.dll assembly. DNN does not always make the appropriate change in the web.config to let itself know where to find this new provider.
Resolution
In the
web.config found in the root directory of the DNN application, you will need to locate the following section:
<members defaultProvider="AspNetMembershipProvider">
<providers>
<clear />
<add name="AspNetMembershipProvider"
type="DotNetNuke.Security.Membership.AspNetMembershipProvider,
DotNetNuke.Provider.AspNetProvider"
providerPath="~\Providers\MembershipProviders\AspNetMembershipProvider\" />
</providers>
</members>
and replace it with:
<members defaultProvider="AspNetMembershipProvider">
<providers>
<clear />
<add name="AspNetMembershipProvider"
type="DotNetNuke.Security.Membership.AspNetMembershipProvider,
DotNetNuke"
providerPath="~\Providers\MembershipProviders\AspNetMembershipProvider\" />
</providers>
</members>
The key change being made is removing the Provider.AspNetProvider from the type attribute. This lets DotNetNuke know to use the DotNetNuke.dll and not the DotNetNuke.Provider.AspNetProvider.dll. Once this change has been made you should be able to login without any issue.
Article ID: 2198, Created: May 13, 2015 at 9:17 PM, Modified: May 14, 2015 at 5:56 PM