About registration issues with Linux and deployment Mysql.data.dll under Windows

Source: Internet
Author: User

MySQL ADO connector:

http://dev.mysql.com/downloads/connector/net/

Select version:

Generally Available releases (1) is the release version (bug what the less version of it), and development releases (2) is the development version

We use version 1

Windows (x86, 32-bit), MSI Installer

This version is the installation version under Window, if you install this version, in the native debugging can not be re-registered Mysql.data.mysqlclient,vs will find dbprovider for this DLL,

If duplicate registration will error

Error creating System.Data configuration section Handler: Column "InvariantName" is constrained to be unique. The value "MySql.Data.MySqlClient" already exists.

Such as:

. Net & Mono (Architecture Independent), ZIP Archive

If this is the version, then you need to manually register the DLL, or debug or deploy to the Linux server when the MySql.Data.dll is unable to be loaded, so to manually register the code below

    <System.Data>        <dbproviderfactories>            <Addname= "MySQL Data Provider"invariant= "MySql.Data.MySqlClient"Description= ". Net Framework Data Provider for MySQL"type= "mysql.data.mysqlclient.mysqlclientfactory,mysql.data,version=6.9.0.0, culture=neutral, PublicKeyToken= C5687fc88969c44d "/>            </dbproviderfactories>    </System.Data>

For

Type= "mysql.data.mysqlclient.mysqlclientfactory,mysql.data,version=6.9.0.0, Culture=neutral, PublicKeyToken= C5687fc88969c44d "

This paragraph changes according to its own version: C:\Windows\Assembly

Note: This will be the wrong time to repeat the registration when debugging under Windows.

I tangled up: After the group of friends stay up, such as head of the help to solve the

Prior to registration, the configuration of the above Web. config changes to

    <System.Data>        <dbproviderfactories>            <Removeinvariant= "MySql.Data.MySqlClient"></Remove>//Remove First, then register            <Addname= "MySQL Data Provider"invariant= "MySql.Data.MySqlClient"Description= ". Net Framework Data Provider for MySQL"type= "mysql.data.mysqlclient.mysqlclientfactory,mysql.data,version=6.9.0.0, culture=neutral, PublicKeyToken= C5687fc88969c44d "/>            </dbproviderfactories>    </System.Data>

OK, solved, thanks for staying up after the help of such as Avatar. I also record this issue to help friends who encounter this problem later.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.