Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0DNN 5.1.2 Multiple Data Providers ErrorDNN 5.1.2 Multiple Data Providers Error
Previous
 
Next
New Post
9/6/2009 11:42 AM
 

Hi -

We have multiple data providers that we've been using for several years on our DNN site. We recently upgraded the site from 4.9.5 to 5.1.2 and the site does not load now. In the web.config file we define our providers like so:

<connectionStrings>

    <!-- Connection String for SQL Server 2005 Express à
<add name="SiteSqlServer" connectionString="Data Source=.;Initial Catalog=DNN;User ID=XXXXX;Password=XXXXXXX" providerName="System.Data.SqlClient" />
 
<add name="OasisSqlServer" connectionString="Data Source=admin-01;Initial Catalog=DB;User ID=XXXXXX;Password=XXXXXX” providerName="System.Data.SqlClient"/>
 </connectionStrings>

and defined in the default providers:

data defaultProvider="SqlDataProvider">

 

We receive the following error:

 

Server Error in '/DNN' Application.

Could not load provider Bold.Providers.OasisDataProvider, Bold.Providers

 

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.Configuration.ConfigurationErrorsException: Could not load provider Bold.Providers.OasisDataProvider, Bold.Providers

Source Error:

Line 67:             Dim type As Type = System.Web.Compilation.BuildManager.GetType(provider.Type, False, True)
Line 68:             If type Is Nothing Then
Line 69:                 Throw New ConfigurationErrorsException(String.format("Could not load provider {0}", provider.Type))
Line 70:             End If
Line 71: 

Source File: C:\Dev-TechVSS\DotNetNuke\Library\ComponentModel\ProviderInstaller.vb    Line: 69

Stack Trace:

[ConfigurationErrorsException: Could not load provider Bold.Providers.OasisDataProvider, Bold.Providers]
   DotNetNuke.ComponentModel.ProviderInstaller.InstallProvider(IContainer container, Provider provider) in C:\Dev-TechVSS\DotNetNuke\Library\ComponentModel\ProviderInstaller.vb:69
   DotNetNuke.ComponentModel.ProviderInstaller.InstallComponents(IContainer container) in C:\Dev-TechVSS\DotNetNuke\Library\ComponentModel\ProviderInstaller.vb:59
   DotNetNuke.ComponentModel.ComponentFactory.InstallComponents(IComponentInstaller[] installers) in C:\Dev-TechVSS\DotNetNuke\Library\ComponentModel\ComponentFactory.vb:42
   DotNetNuke.Common.Global.Application_Start(Object Sender, EventArgs E) in C:\Dev-TechVSS\DotNetNuke\Website\App_Code\Global.asax.vb:72

 


Version Information: Microsoft .NET Framework Version:2.0.50727.3082; ASP.NET Version:2.0.50727.3082

 Any ideas why this is occuring? Thanks!

 

      <providers>
        <clear />
<add name="SqlDataProvider" type="DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider" connectionStringName="SiteSqlServer" upgradeConnectionString="" providerPath="~\Providers\DataProviders\SqlDataProvider\" objectQualifier="" databaseOwner="dbo" />
 
<add name="OasisDataProvider" type="Bold.Providers.OasisDataProvider, Bold.Providers" connectionStringName="OasisSqlServer" upgradeConnectionString="" providerPath="~\Providers\DataProviders\OasisDataProvider\" objectQualifier="" databaseOwner="dbo"/>
      </providers>
</data>
 
New Post
9/7/2009 9:29 AM
 

Hi Larry,

You didn't mention it in your problem statement, so I thought I'd ask: have you verified that the assembly "Bold.Providers.dll" actually still exists in your bin directory, and wasn't somehow moved or removed?

If so, then it is likely that the class Bold.Providers.OasisDataProvider is throwing during static initialization (or, less likely, during instance construction).  DotNetNuke doesn't do a great job here with exception management, and often swallows an underlying exception during component instantiation (there are some .NET technical issues here that are a bit beyond DotNetNuke's control, so it's a bit unfair for me to place the blame entirely there).

Do you have access to its source so that you might investigate why it is throwing?

Brandon


Brandon Haynes
BrandonHaynes.org
 
New Post
9/8/2009 12:32 PM
 
Hi Brandon, thanks for your reply. There is no Bold.Providers.dll. I beleive there never has been. Has anything changed in 5.1.2 that would make creating the custom provider different from the previous versions 4.9 and prior?
 
New Post
9/9/2009 10:20 AM
 

All providers listed in web.config need to be present or entry been removed, sorry.


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
9/11/2009 9:11 AM
 

As Sebastian indicated, all the providers defined in your web.config will need to exist within the application or the application will fail hard (because it tries to instantiate all of them).  I do not *believe* that this behavior has changed since 4.9, but I am only semi-confident about this (if I were wrong here it would explain your issue).

That said, why do you have a provider defined that does not exist? Where IS that class defined, anyway?

Brandon


Brandon Haynes
BrandonHaynes.org
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0DNN 5.1.2 Multiple Data Providers ErrorDNN 5.1.2 Multiple Data Providers Error


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out