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

跟風遠走 提交于 2019-12-01 16:59:22

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.

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.

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.

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.

Jersey355

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!