Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

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, PublicKeyToken=c5687fc88969c44d"  connectionStringName="ApplicationServices" autogenerateschema="true"/>
    <add applicationName="/" name="AspNetWindowsTokenRoleProvider"
      type="System.Web.Security.WindowsTokenRoleProvider, System.Web, Version=2.0.0" />

  </providers>
</roleManager>
share|improve this question
 
Interesting, Can you post the relevant part of the web.config as well? –  Caspar Kleijne May 14 '11 at 6:37
add comment

1 Answer

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.