locked
Machine.config looses entry 'DbProviderFactories ... MySQL' RRS feed

  • Question

  • Thanks for your time!

    upfront: is this the appropriate forum for my issue?

    environment: Windows7 Ult 64bit, VS2008, MySQL 5.1, .net connector 6.3.5.0

    I want to build a 'Wcf Service Application' which connects to a MySQL DB. See below 'Actions' I take!
    It seems that the deletion of the 'DbProviderFactories ... MySQL' statement in Machine.config causes that the MySQL data source disappears!

    PS: In a standard WEB application with a SqlDataSource there is no problem to connect to a MySQL DB!

    PSPS: sometimes when doing below actions the system seems to go into a loop which I can only solve by killing the 'VS2008 Wcf App' (ctrl-alt-del).
    At this time I get a msg from the 'system' to report this to MS if it recurs!

    Actions in VS2008:
    Open: Wcf Service Application
    right click project --> add --> new item
    choose: ADO.NET Entity data Model
    in 'Entity Data Model Wizard' choose 'Generate from Database' --> next ...

    ATTENTION:  ... after previous 'next' the entry 'DbProviderFactories ... MySQL' in Machine.config is gone!

    ... the wizard shows me now 'Choose Your Data Connection' --> click 'New Connection'
    I get wizard screen 'Choose Data Source': BUT there is no MySQL source shown!?

    Thanks for your time and hints
    ed

    • Moved by Larcolais Gong Monday, November 22, 2010 10:13 AM (From:Visual Studio Setup and Installation)
    Sunday, November 21, 2010 8:45 AM

Answers

  • Hello, I don't think this is a WCF issue either. Your main problem is you're unable to connect to MySQL using Entity Framework wizard, right? You mentioned you have deleted DbProviderFactories from machine.config. So can you add it back? By default (without MySQL provider installed), it looks like below:

    <DbProviderFactories>

    <add name="Microsoft SQL Server Compact Data Provider" invariant="System.Data.SqlServerCe.3.5" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=3.5.1.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/>

    <add name="Microsoft SQL Server Compact Data Provider 4.0" invariant="System.Data.SqlServerCe.4.0" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/>

    </DbProviderFactories>

    I don't know the configuration for MySQL. If you're unable to fix machine.config, you can reinstall MySQL Connect for .NET from http://www.mysql.com/downloads/connector/net

     


    Lante, shanaolanxing This posting is provided "AS IS" with no warranties, and confers no rights.
    • Marked as answer by Yi-Lun Luo Friday, November 26, 2010 10:00 AM
    Tuesday, November 23, 2010 2:47 AM
  • Hi Yi-Yun Luo, thanks for coming back

    to clarify: I'm NOT deleting the Mysql entry myself in machine.config! It get's deleted 'automatically' when adding a ado.net entity model after the first'next' like described in my 1st msg. However, after it got deleted I add it again to machine.config manually to be able to run my old/other apps using MySql

    Thanks again for your time
    ed

     

     

     

    • Marked as answer by edkaufmann Saturday, January 8, 2011 4:40 PM
    Wednesday, November 24, 2010 7:43 PM
  • I'm still having problems to generate my 'ADO.NET Entity data Model' for my WCF service using MySql.

    I consider this thread closed and might openone, if necessary, in a WCF forum.

    Thanks for everybody's time ed

    well, after spending some time .... I found it!

    the net connector 6.3.5 needs to be upgraded with 6.3.6 .  This fixes MySql bug #58278

    ed

    • Marked as answer by edkaufmann Saturday, January 8, 2011 4:40 PM
    Saturday, January 8, 2011 4:39 PM

All replies

  • Hi edkaufmann,

    Your concern is more like WCF, here is Off Topic, I’ll help you moving your thread into appropriate forum.

    Regards,

    Larcolais


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Monday, November 22, 2010 10:12 AM
  • Hello, I don't think this is a WCF issue either. Your main problem is you're unable to connect to MySQL using Entity Framework wizard, right? You mentioned you have deleted DbProviderFactories from machine.config. So can you add it back? By default (without MySQL provider installed), it looks like below:

    <DbProviderFactories>

    <add name="Microsoft SQL Server Compact Data Provider" invariant="System.Data.SqlServerCe.3.5" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=3.5.1.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/>

    <add name="Microsoft SQL Server Compact Data Provider 4.0" invariant="System.Data.SqlServerCe.4.0" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/>

    </DbProviderFactories>

    I don't know the configuration for MySQL. If you're unable to fix machine.config, you can reinstall MySQL Connect for .NET from http://www.mysql.com/downloads/connector/net

     


    Lante, shanaolanxing This posting is provided "AS IS" with no warranties, and confers no rights.
    • Marked as answer by Yi-Lun Luo Friday, November 26, 2010 10:00 AM
    Tuesday, November 23, 2010 2:47 AM
  • Hi Yi-Yun Luo, thanks for coming back

    to clarify: I'm NOT deleting the Mysql entry myself in machine.config! It get's deleted 'automatically' when adding a ado.net entity model after the first'next' like described in my 1st msg. However, after it got deleted I add it again to machine.config manually to be able to run my old/other apps using MySql

    Thanks again for your time
    ed

     

     

     

    • Marked as answer by edkaufmann Saturday, January 8, 2011 4:40 PM
    Wednesday, November 24, 2010 7:43 PM
  • I'm still having problems to generate my 'ADO.NET Entity data Model' for my WCF service using MySql.

    I consider this thread closed and might openone, if necessary, in a WCF forum.

    Thanks for everybody's time ed

    well, after spending some time .... I found it!

    the net connector 6.3.5 needs to be upgraded with 6.3.6 .  This fixes MySql bug #58278

    ed

    • Marked as answer by edkaufmann Saturday, January 8, 2011 4:40 PM
    Saturday, January 8, 2011 4:39 PM
  • Thanks for your time!

    upfront: is this the appropriate forum for my issue?

    environment: Windows7 Ult 64bit, VS2008, MySQL 5.1, .net connector 6.3.5.0

    I want to build a 'Wcf Service Application' which connects to a MySQL DB. See below 'Actions' I take!
    It seems that the deletion of the 'DbProviderFactories ... MySQL' statement in Machine.config causes that the MySQL data source disappears!

    PS: In a standard WEB application with a SqlDataSource there is no problem to connect to a MySQL DB!

    PSPS: sometimes when doing below actions the system seems to go into a loop which I can only solve by killing the 'VS2008 Wcf App' (ctrl-alt-del).
    At this time I get a msg from the 'system' to report this to MS if it recurs!

    Actions in VS2008:
    Open: Wcf Service Application
    right click project --> add --> new item
    choose: ADO.NET Entity data Model
    in 'Entity Data Model Wizard' choose 'Generate from Database' --> next ...

    ATTENTION:  ... after previous 'next' the entry 'DbProviderFactories ... MySQL' in Machine.config is gone!

    ... the wizard shows me now 'Choose Your Data Connection' --> click 'New Connection'
    I get wizard screen 'Choose Data Source': BUT there is no MySQL source shown!?

    Thanks for your time and hints
    ed


    well, after spending some time .......I found it!

    the net connector 6.3.5 needs to be upgraded with 6.3.6 .  This fixes MySql bug #58278

    Thanks for your time

    ed

    Monday, January 10, 2011 9:10 AM