Laurent Hinoul

“Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.” - John F. Woods

How to solve DbProviderFactories section can only appear once per config file error

Once upon a time, there was a program called ‘Agresso’. It uses the .NET framework.

When I started the program and wanted to log in. I got the following error message: DbProviderFactories section can only appear once per config file error. -.-‘

After some research, I discovered it was a bug in the .NET framework. (not surprising me :p). Now, to solve this, do the following steps below.

First, go to C:\Windows\Microsoft.NET\Framework. There you can see different versions. First go to the folder v4.0.30319 and open the Machine.Config file in a text editor. In that file, search for the string “<DbProviderFactories/>”. If you found that you can see the following code:

The <DbProviderFactories/> doesn’t belong there so delete this line:

Save it and look in the other folders if the line is there too. It’s possible that this line also appears in v2.0.50727.

When I did this, the program worked like a charm. Enjoy!

5 comments for “How to solve DbProviderFactories section can only appear once per config file error

  1. JC
    18/03/2016 at 21:40

    I’m new to VS and to SSDTBI and this solution worked in my environment… Thanks!
    JC

  2. Denis
    31/05/2016 at 14:10

    Don’t forget to make the same for the Framework64 directory too ! It works well, thanks ! DS

  3. Angela M
    01/12/2016 at 07:04

    Great instructions… worked perfectly!

  4. 10/12/2016 at 20:49

    Hello.
    This works and corrects the problem with my DxO Optics Pro software.
    Thanks a lot!

  5. John
    06/02/2017 at 20:49

    Thank you so much. This fixed my problem. I was unable to install Google Drive for Microsoft Office and this was the only article I found that was related to the error I was getting.

Leave a Reply

%d bloggers like this: