What's up,
I am already using my own custom AspNetMembershipProvider provider. Works great. I love that this is an option.
Now I would like to use a custom SqlDataProvider provider. Created a new project in VS 2005 just like I did with the Membership provider. Updated the web.config file to point to my custom provider, just like I did before:
<data defaultProvider="MySqlDataProvider">
<providers>
<clear/>
<add name="SqlDataProvider" type="DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider" connectionStringName="SiteSqlServer" upgradeConnectionString="" providerPath="~\Providers\DataProviders\SqlDataProvider\" objectQualifier="" databaseOwner="dbo"/>
<add name="MySqlDataProvider" type="DotNetNuke.Data.SqlDataProvider, MyProvider.Provider.SqlDataProvider" connectionStringName="SiteSqlServer" upgradeConnectionString="" providerPath="~\Providers\DataProviders\SqlDataProvider\" objectQualifier="" databaseOwner="dbo"/>
</providers>
</data>
But after turning to run this MANY times I always get the error:
Value cannot be null.
Parameter name: type
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentNullException: Value cannot be null.
Parameter name: type
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. |
Stack Trace:
[ArgumentNullException: Value cannot be null.
Parameter name: type]
System.Activator.CreateInstance(Type type, Boolean nonPublic) +2768503
DotNetNuke.Framework.Reflection.CreateObject(String TypeName, String CacheKey, Boolean UseCache) +232
DotNetNuke.Framework.Reflection.CreateObject(String ObjectProviderType, String ObjectProviderName, String ObjectNamespace, String ObjectAssemblyName, Boolean UseCache) +571
DotNetNuke.Framework.Reflection.CreateObject(String ObjectProviderType, String ObjectNamespace, String ObjectAssemblyName) +17
DotNetNuke.Security.Membership.Data.DataProvider.CreateProvider() +53
DotNetNuke.Security.Membership.Data.DataProvider..cctor() +28
[TypeInitializationException: The type initializer for 'DotNetNuke.Security.Membership.Data.DataProvider' threw an exception.]
DotNetNuke.Security.Membership.Data.DataProvider.Instance() +0
DotNetNuke.Security.Membership.AspNetMembershipProvider..cctor() +20
[TypeInitializationException: The type initializer for 'DotNetNuke.Security.Membership.AspNetMembershipProvider' threw an exception.]
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck) +0
System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache) +103
System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache) +261
System.Activator.CreateInstance(Type type, Boolean nonPublic) +66
DotNetNuke.Framework.Reflection.CreateObject(String TypeName, String CacheKey, Boolean UseCache) +232
DotNetNuke.Framework.Reflection.CreateObject(String ObjectProviderType, String ObjectProviderName, String ObjectNamespace, String ObjectAssemblyName, Boolean UseCache) +571
DotNetNuke.Security.Membership.MembershipProvider.CreateProvider() +38
DotNetNuke.Security.Membership.MembershipProvider..cctor() +13
[TypeInitializationException: The type initializer for 'DotNetNuke.Security.Membership.MembershipProvider' threw an exception.]
DotNetNuke.Security.Membership.MembershipProvider.Instance() +0
DotNetNuke.Entities.Users.UserController..cctor() +5
[TypeInitializationException: The type initializer for 'DotNetNuke.Entities.Users.UserController' threw an exception.]
DotNetNuke.Entities.Users.UserController.GetUserCountByPortal(Int32 portalId) +0
DotNetNuke.Entities.Portals.PortalInfo.get_Users() +17
DotNetNuke.Entities.Portals.PortalSettings.GetPortalSettings(Int32 TabId, PortalAliasInfo objPortalAliasInfo) +1302
DotNetNuke.Entities.Portals.PortalSettings..ctor(Int32 tabId, PortalAliasInfo objPortalAliasInfo) +83
DotNetNuke.HttpModules.UrlRewriteModule.OnBeginRequest(Object s, EventArgs e) +5776
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64
|
Am I missing something? Do I need to override something else?
Thanks very much!