无法初始化提供者.架构丢失或不正确.用于MySql.Web连接器 [英] Unable to initialize provider. Missing or incorrect schema. for MySql.Web connector
本文介绍了无法初始化提供者.架构丢失或不正确.用于MySql.Web连接器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嘿,伙计们在这里遇到了一个小问题..我正在尝试使用MySql Connector 6.2.2.0作为成员资格和角色提供者.
Hey guys and gals running into a little issue here.. I'm trying to use MySql Connector 6.2.2.0 for membership and role providers..
我遇到的问题是:无法初始化提供程序.模式丢失或不正确.
<authentication mode="Forms"/>
<roleManager defaultProvider="MySqlRoleProvider"
enabled="true"
cacheRolesInCookie="true"
cookieName=".ASPROLES"
cookieTimeout="30"
cookiePath="/"
cookieRequireSSL="false"
cookieSlidingExpiration="true"
cookieProtection="All" >
<providers>
<clear />
<add
name="MySqlRoleProvider"
type="MySql.Web.Security.MySQLRoleProvider, MySql.Web,
Version=6.2.2.0,Culture=neutral, PublicKeyToken=c5687fc88969c44d"
connectionStringName="mySQL"
applicationName="capcafe"
writeExceptionsToEventLog="true"
/>
</providers>
</roleManager>
<membership defaultProvider="MySqlMembershipProvider">
<providers>
<add connectionStringName="mySQL"
applicationName="capcafe"
minRequiredPasswordLength="5"
requiresQuestionAndAnswer="false"
requiresUniqueEmail="false"
minRequiredNonalphanumericCharacters="0"
name="MySqlMembershipProvider"
type="MySql.Web.Security.MySQLMembershipProvider, MySql.Web, Version=6.2.2.0,
Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
</providers>
</membership>
这是似乎不喜欢的行:
Line 57: type="MySql.Web.Security.MySQLRoleProvider, MySql.Web,
Version=6.2.2.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"
我同时在My Bin中引用了MySql.Web和MySql.Data!解决该问题的任何帮助将不胜感激
I have both MySql.Web and MySql.Data referenced and in my bin! Any help resolving this issue will be very much appreciated
推荐答案
添加对程序集的引用,将autogenerateschema ="true"属性添加为两个:
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>
使用ASP.Net配置工具.
use ASP.Net configuration tool.
这篇关于无法初始化提供者.架构丢失或不正确.用于MySql.Web连接器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文