Forum Discussion
An error occurred creating the configuration section handler for system.data: Column 'InvariantName'
An error occurred creating the configuration section handler for system.data: Column 'InvariantName' is constrained to be unique. Value 'MySql.Data.MySqlClient' is already present. (C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config line
3 Replies
- AnonymousNot applicable
Hi, insandur
You can locate the machine.config file:
For 32-bit systems: C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config
For 64-bit systems: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config
Then open the machine.config file in a text editor with administrative privileges. Search for the MySql.Data.MySqlClient entry under the <DbProviderFactories> section. Try to Remove or comment out the duplicate entry. Ensure that only one entry for MySql.Data.MySqlClient exists. Save the file and restart your application or service.How to Get Your Question Answered Quickly
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- insandurHelper II
An error occurred creating the configuration section handler for system.data: Column 'InvariantName' is constrained to be unique. Value 'MySql.Data.MySqlClient' is already present. (C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config line
- EZReinertRegular Visitor
In my case I upgraded v8.0.30 to v9.0.0 and found a duplicate entry in the machine.config file.
Deleted the line that was related to old version.
Restarted machine.
Everything is working ok now.
Thanks.