带有 mysql的Asp.net :
我向membership provider
添加了mysql roleprovider
,web.config
,并添加了对:
mysql.web.dll
mysql.data.dll
然后我尝试创建角色以下内容:
The given assembly name or codebase was invalid.
(Exception from HRESULT: 0x80131047)
(C:\Users\joms\Desktop\invent-mysql\Inventory\Inventory\web.config line 52) at
System.Web.Administration.WebAdminPage.CallWebAdminHelperMethod(Boolean
isMembership, String methodName, Object[] parameters, Type[] paramTypes) at
ASP.security_roles_manageallroles_aspx.BindGrid() at
ASP.security_roles_manageallroles_aspx.Page_Load() at
System.Web.Util.CalliHelper.ArglessFunctionCaller(IntPtr fp, Object o) at
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender,
EventArgs e) at
System.Web.UI.Control.OnLoad(EventArgs e) at
System.Web.UI.Control.LoadRecursive() at
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint,
Boolean includeStagesAfterAsyncPoint)
任何人都可以提供帮助? webonfig的相关部分是........
<membership defaultProvider="MySQLMembershipProvider">
<providers>
<clear />
<add name="MySQLMembershipProvider" type="MySql.Web.Security.MySQLMembershipProvider, MySql.Web, Version=6.0.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="true" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/" autogenerateschema="true" />
<remove name="MySQLMembershipProvider" />
<add name="MySQLMembershipProvider" type="MySql.Web.Security.MySQLMembershipProvider, MySql.Web, Version=6.3.5.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" applicationName="/" description="MySQL default application" connectionStringName="ApplicationServices" writeExceptionsToEventLog="False" autogenerateschema="True" enablePasswordRetrieval="False" enablePasswordReset="True" requiresQuestionAndAnswer="False" requiresUniqueEmail="True" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" passwordStrengthRegularExpression="" />
</providers>
</membership>
<profile defaultProvider="MySQLProfileProvider">
<providers>
<clear />
<add name="MySQLProfileProvider" type="MySql.Web.Profile.MySQLProfileProvider, MySql.Web, Version=6.1.1.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" connectionStringName="ApplicationServices" autogenerateschema="true" />
</providers>
</profile>
<roleManager enabled="true" defaultProvider="MySQLRoleProvider">
<providers>
<clear />
<add name="MySQLRoleProvider" type="MySql.Web.Security.MySQLRoleProvider, MySql.Web, Version=6.1.1.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" connectionStringName="ApplicationServices" autogenerateschema="true"/>
<add applicationName="/" name="AspNetWindowsTokenRoleProvider"
type="System.Web.Security.WindowsTokenRoleProvider, System.Web, Version=2.0.0" />
</providers>
</roleManager>
答案 0 :(得分:0)
首先,首先注释掉或删除提供商的添加/删除。然后编写一个虚拟页面,尝试直接实例化RoleProvider,看看是否可以获得更有用的堆栈跟踪。我怀疑似乎被引用的不同版本,并建议验证您有一组兼容的库。 6.3.6可以在MySql网站上找到,所以我要清除电路板并从那里开始。