Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6255781
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T14:25:46+00:00 2026-05-24T14:25:46+00:00

Building a simple asp.net web app just to test things out (will obviously refactor

  • 0

Building a simple asp.net web app just to test things out (will obviously refactor before anything gets built for a production site), and I’m trying to connect to a mysql database using the latest version of the Enterprise Library, and am running into an error:
“The type MySqlClientFactory does not contain the ConfigurationElementTypeAttribute.”

I’ve gone through several different forms of trying to set up the configuration, and based on everything i’ve found, distilled it down to this:
in my web.config i’ve got this:

<configSections>
    <section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="true" />
</configSections>
<dataConfiguration defaultDatabase="MyDB">
<providerMappings>
  <add name="MySql.Data.MySqlClient" databaseType="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data,Version=6.3.6,Culture=neutral,PublicKeyToken=c5687fc88969c44d"/>
</providerMappings>
</dataConfiguration>
<connectionStrings>
     <add name="MyDB" connectionString="Server=localhost;Database=MyDB;Uid=root;Pwd=****;"
     providerName="MySql.Data.MySqlClient"/>
</connectionStrings>

and in my default.aspx page I’ve got this:

protected void Page_Load(object sender, EventArgs e)
{
    string sql = "select * from users";
    Database db = EnterpriseLibraryContainer.Current.GetInstance<Database>("MyDB");

    var reader = db.ExecuteReader(CommandType.Text, sql);
    while (reader.NextResult())
    {
        Response.Write(reader["userName"] + "<br />");
    }
}

so, very simple… but again, the error i’m getting is:
“The type MySqlClientFactory does not contain the ConfigurationElementTypeAttribute.”

and I can’t find any reference to that… the MSDN doesn’t say much about that attribute, and what it does say I can’t seem to relate to what i’m doing… any help would be appreciated.

Thank you!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T14:25:47+00:00Added an answer on May 24, 2026 at 2:25 pm

    EntLib doesn’t support MySql out of the box. EntLibContrib has a proper MySql Data Provider. The one released, however, targets EntLib4.1. I can see a porting effort to v5.0 is under way but the Data Access block doesn’t appear to be done yet. You may need to port yourself.

    The factory you are using doesn’t seem to be EntLib-enabled. You can find a good treatment of the ConfigurationElementTypeAttribute as well as other guidance on how to extend EntLib in the Enterprise Library Extensibility Hands-on Labs.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm building a simple ASP.NET web application in VS 2008 with a SQL 2005
I'm looking at building a simple web app that will expose an API that
I'm building a simple multi-user (multi-tenant?) App with ASP.NET MVC3 and EF4, one database,
I am building a simple Django app that will use scribd to display documents.
Quite simply I want to be able to test that a Asp.Net web forms
I am building a multi-layered application that has an ASP.NET MVC web application. It
I am building an ASP.NET MVC 3 app that has both a www front-end
I'm building a simple ice sliding puzzle to test uses of allegro. So far
I'm building a simple accounting app to be used for personal finance. A user
I'm building a simple web-based RSS reader in Python, but I'm having trouble parsing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.