Unable to initialize provider. Missing or incorrect schema. for MySql.Web connector

前端 未结 5 1867
清歌不尽
清歌不尽 2021-01-18 02:41

I am trying to use MySql Connector 6.2.2.0 for membership and role providers.

The issue I\'m having is: Unable to initialize provider. Missing or incorrect

相关标签:
5条回答
  • 2021-01-18 02:51

    Add references to the assemblies, add autogenerateschema="true" attribute to both as:

    <providers>
    <remove name="MySQLProfileProvider"/>
    <add name="MySQLProfileProvider" autogenerateschema="true" type="MySql.Web.Profile.MySQLProfileProvider, MySql.Web, Version=6.2.2.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" connectionStringName="LocalMySqlServer" applicationName="/"/>
    </providers>
    

    use ASP.Net configuration tool.

    0 讨论(0)
  • 2021-01-18 02:58

    CodeMonkey's solution worked for me... I was actually deploying a new app to a Win 2008 Server VM. The schema could not be generated until I specified the LocalMySql connection string and set the MySQLRoleProvider autogenerate to true.

    0 讨论(0)
  • 2021-01-18 03:05

    My problem was I had "localhost" in my connection string instead of the IP address of the webhost's MySQL server.

    Once I changed that in my web.config file it worked fine, so you need to check your web.config file very carefully.

    0 讨论(0)
  • 2021-01-18 03:11

    I had this problem, it turned out there was no password in my connection string, I think checking carefully that your connection string is correct would be a good place to start.

    0 讨论(0)
  • 2021-01-18 03:15

    I was experiencing this exact same issue. Mine ended up being a case issue since I was deploying my site to a linux server running Mono. Enabling autogenerateschema="true" helped me figure this one out. Some hosts won't let the code generate the necessary tables though, so if it doesn't auto-generate your schema then check out casing issues.

    0 讨论(0)
提交回复
热议问题