We are currently evaluating es and I am stumpted. I have added 5 entries to web.config, one for DNN itself plus one for each of the country specific databases our host will support via multiple portals on the same site. I have also configured global.asax to register the loader. The web site will always use the DNN database for DNN/module specific stuff, but use the specific country's database for application data. The databases are SQL Server and replicated from the target country's local database to the web server and visa versa. Consequently there is no opportunity to place all tables in the one database. Therefore each module needs to interact with data from two databases, depending on whether the data is DNN/Module data or application data. Firstly, I keep getting an error in the module "Object reference not set to an instance of an object" as soon as I try to execute any data retrieval method; LoadByPrimaryKey, LoadAll, etc. I have verified that prior to the read request, the database default has been set to the correct database. I'm not getting anywhere with this due to the lousy degbugging in .NET (the DNN server is not local so cannot use runtime debugging) so any help would be greatly appreciated.
Extract from web.config
<sectionGroup name="EntitySpaces" type="EntitySpaces.Interfaces.esConfigSettings, EntitySpaces.Core" >
<section name="connectionInfo" type="EntitySpaces.Interfaces.esConfigSettings, EntitySpaces.Interfaces" allowLocation="true" allowDefinition="Everywhere" restartOnExternalChanges="true" />
</sectionGroup>
<section name="infragistics.web" type="System.Configuration.SingleTagSectionHandler,System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
</configSections>
<infragistics.web enableAppStyling="true" styleSetPath="~/ig_res/" styleSetName="Default"/>
<EntitySpaces>
<connectionInfo default="SQL_au">
<connections>
<add name="SQL_DNN"
providerMetadataKey="esDefault"
sqlAccessType="DynamicSQL"
provider="EntitySpaces.SqlClientProvider"
providerClass="DataProvider"
connectionString="User ID=dnnuser;Password=XXXX;Initial Catalog=DotNetNuke_dev;Data Source=PromaW2"
databaseVersion="2005"/>
<add name="SQL_au"
providerMetadataKey="esDefault"
sqlAccessType="DynamicSQL"
provider="EntitySpaces.SqlClientProvider"
providerClass="DataProvider"
connectionString="User ID=proma;Password=XXXX;Initial Catalog=Pro-Ma;Data Source=PromaW2"
databaseVersion="2005"/>
<add name="SQL_cad"
providerMetadataKey="esDefault"
sqlAccessType="DynamicSQL"
provider="EntitySpaces.SqlClientProvider"
providerClass="DataProvider"
connectionString="User ID=proma;Password=XXXX;Initial Catalog=Canada;Data Source=PromaW2"
databaseVersion="2005"/>
<add name="SQL_nz"
providerMetadataKey="esDefault"
sqlAccessType="DynamicSQL"
provider="EntitySpaces.SqlClientProvider"
providerClass="DataProvider"
connectionString="User ID=proma;Password=XXXX;Initial Catalog=NZ;Data Source=PromaW2"
databaseVersion="2005"/>
<add name="SQL_uk"
providerMetadataKey="esDefault"
sqlAccessType="DynamicSQL"
provider="EntitySpaces.SqlClientProvider"
providerClass="DataProvider"
connectionString="User ID=proma;Password=XXXX;Initial Catalog=UK;Data Source=PromaW2"
databaseVersion="2005"/>
</connections>
</connectionInfo>
</EntitySpaces>
Contents of global.asax
<%@ Application Inherits="DotNetNuke.Common.Global" Language="VB" %>
<script runat="server">
sub Application_Start(sender as object, e as EventArgs)
EntitySpaces.Interfaces.esProviderFactory.Factory = New EntitySpaces.LoaderMT.esDataProviderFactory
end sub
</script>
Extract from module getting error
Dim Product As New Products
Product.es.Connection.Name = "SQL_au"
Product.LoadByPrimaryKey(esSqlAccessType.DynamicSQL, "10522") <-- Error
PLEASE HELP!!!