I'd like to use the DMX API outside the context of DNN to provide Entry Info data to another system. I've been trying to get an instance of the SqlDataProvider using the following code:
Bring2mind.DNN.Modules.DMX.Data.
DataProvider dmxDataProvider = (Bring2mind.DNN.Modules.DMX.Data.DataProvider)DotNetNuke.Framework.Reflection.CreateObject("dmxdata");
with the following configuration:
<
<
configSections>sectionGroup name="dotnetnuke">
<
section name="dmxdata" requirePermission="false" type="DotNetNuke.Framework.Providers.ProviderConfigurationHandler, DotNetNuke" />
<
sectionGroup>configSections>dotnetnuke>
<
<
<
<
dmxdata defaultProvider="dmxSqlDataProvider">providers>clear />add name="dmxSqlDataProvider" type="Bring2mind.DNN.Modules.DMX.Data.SqlDataProvider, Bring2mind.DNN.Modules.DMX.Core" connectionString="SiteSqlServer" upgradeConnectionString="" providerPath="" objectQualifier="" databaseOwner="dbo" />providers>dmxdata>
dotnetnuke>
but get the following exception:
System.ArgumentNullException : Value cannot be null.
Parameter name: type
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.Activator.CreateInstance(Type type)
at DotNetNuke.Framework.Reflection.CreateObject(String TypeName, String CacheKey, Boolean UseCache)
at DotNetNuke.Framework.Reflection.CreateObject(String ObjectProviderType, String ObjectProviderName, String ObjectNamespace, String ObjectAssemblyName, Boolean UseCache)
at DotNetNuke.Framework.Reflection.CreateObject(String ObjectProviderType, String ObjectNamespace, String ObjectAssemblyName)...
What needs to be done in order to get the DMX data provider instance when executing outside of DNN?