I have an install of DNN that has gone through many upgrades. However when I tried to upgrade to 4.7 I got an error:
[ArgumentNullException: Value cannot be null.
Parameter name: type]
System.Activator.CreateInstance(Type type, Boolean nonPublic) +2768503
DotNetNuke.Framework.Reflection.CreateObject(String ObjectProviderType, String ObjectProviderName, String ObjectNamespace, String ObjectAssemblyName, Boolean UseCache) +582
DotNetNuke.Data.DataProvider.CreateProvider() +47
DotNetNuke.Data.DataProvider..cctor() +13
[TypeInitializationException: The type initializer for 'DotNetNuke.Data.DataProvider' threw an exception.]
DotNetNuke.Entities.Portals.PortalAliasController.GetPortalAliasByPortalID(Int32 PortalID) +38
DotNetNuke.Entities.Portals.PortalSettings.GetPortalAliasLookup() +74
DotNetNuke.Entities.Portals.PortalSettings.GetPortalAliasInfo(String PortalAlias) +14
DotNetNuke.HttpModules.UrlRewriteModule.RewriteUrl(HttpApplication app) +3527
DotNetNuke.HttpModules.UrlRewriteModule.OnBeginRequest(Object s, EventArgs e) +826
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64
So, I spent the next 4 hours troubleshooting this.
After reading posts of people with similar problems I figured the problem was from the upgrade of past versions and leftover dll's in the \bin directory. I renamed the bin directory and then copied over the \bin directory from the 4.7 install. I then added ONE dll at a time until I found the one that crashed the site with the above error.
I removed DotNetNuke.Provider.Membership.SqlDataProvider.dll and the site now works.
I hope this helps someone.