Browsed by
Day: March 13, 2013

DbProviderFactories section can only appear once per config file

DbProviderFactories section can only appear once per config file

Recently I came across this error while doing some housekeeping and updating some old websites to .Net 4.0: HttpException: Failed to generate code. The ‘DbProviderFactories’ section can only appear once per config file. The problem is with the machine.config file in the .Net 4.0 folder on the hosting server. For some reason, an additional <DbProviderFactories /> element is present and needs to be removed. On the affected server, open C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config in your favorite editor (Also might want to check C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config)…

Read More Read More