开发者

asp.net role creation problem with mysql

Asp.net with mysql:

I added mysql membership provider,roleprovider to the the web.config and also add reference to:

mysql.web.dll
mysql.data.dll

Then I try to create the role the following is coming:

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) 

Anyone can help? the relevant part of webonfig is........

<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, Pub开发者_开发知识库licKeyToken=c5687fc88969c44d"  connectionStringName="ApplicationServices" autogenerateschema="true"/>
    <add applicationName="/" name="AspNetWindowsTokenRoleProvider"
      type="System.Web.Security.WindowsTokenRoleProvider, System.Web, Version=2.0.0" />

  </providers>
</roleManager>


Well, first things first, comment out or remove the Add/Remove from your providers. Then write a dummy page to try to instantiate the RoleProvider directly and see if you can get a more useful stack trace. I'm suspicious of the different versions that seem to be being referenced and would suggest verifying that you've got a set of compatible libraries. 6.3.6 is available from the MySql website, so I'd clear the board and start there.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜