Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7639739
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T08:29:51+00:00 2026-05-31T08:29:51+00:00

I am using MySQL Connector/.NET and a custom MySQL membership provider. Here is a

  • 0

I am using MySQL Connector/.NET and a custom MySQL membership provider.

Here is a part of the web.config:

<roleManager enabled="true" defaultProvider="MySQLRoleProvider">
  <providers>
    <clear />
    <add applicationName="name" description=""
      connectionStringName="MySQLMP" writeExceptionsToEventLog="False"
      autogenerateschema="True" name="MySQLRoleProvider" type="MySql.Web.Security.MySQLRoleProvider, MySql.Web, Version=6.4.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
  </providers>
</roleManager>
<membership defaultProvider="MySQLMembershipProvider">
  <providers>
    <clear />
    <remove name="MySQLMembershipProvider" />
    <add name="MySQLMembershipProvider" type="MySql.Web.Security.MySQLMembershipProvider, MySql.Web, Version=6.4.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" applicationName="name" description="MySQL default application" connectionStringName="MySQLMP" writeExceptionsToEventLog="False" autogenerateschema="True" enablePasswordRetrieval="False" enablePasswordReset="True" requiresQuestionAndAnswer="True" requiresUniqueEmail="True" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" passwordStrengthRegularExpression="" />
  </providers>
</membership>
<profile defaultProvider="MySQLProfileProvider">
  <properties>
    <add name="AccountNumber" type="string" provider="" />
    <remove name="MySQLProfileProvider" />
    <add name="MySQLProfileProvider" type="MySql.Web.Profile.MySQLProfileProvider, MySql.Web, Version=6.4.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"/>
  </properties>
  <providers>
    <clear />
    <add name="MySQLProfileProvider" connectionStringName="MySQLMP" applicationName="name" type="MySql.Web.Profile.MySQLProfileProvider, MySql.Web, Version=6.4.4.0, Culture=neutral, PublicKeyToken=C5687FC88969C44D" />
  </providers>
</profile>

In addition to that I am using ASP.NET authentication form.
What I am trying to do is: after a user logs in, I want to check if he/she is an admin and redirect to a certain page. Easy, right?

I believe, I am supposed to use the following:

if(Role.IsUserInRole(lgnCustomer.UserName, "Administrator"))
        lgnCustomer.DestinationPageUrl = "~/admin";

However, for some reason I cannot use “Role”. It seems like its missing reference to the MySQLRoleProvider.

Everything else (user registration, log in, role differentiation) works…

Thank you in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T08:29:53+00:00Added an answer on May 31, 2026 at 8:29 am

    The answer is not as difficult as I thought.
    Apparently, it does not matter that a membership provider is something other than default SQL provider. I had to use using System.Web.Security; in the beginning, not the using MySQL.Web.Security;

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using MySql Connector .NET to load an account and transfer it to the
I'm a beginner at this. I'm using mysql connector .net to connect vb.net with
I'm using the MySql connector for .NET to copy data from MySql servers to
I am using MySQL with the .Net connector on 64 bit Windows. For some
I am using MySQL .net connector 6.4.4.0 and Entity Frame work 4.1 and trying
I am working with asp.NET and c#, using the MySQL's connector/NET plug-in thingy to
I'm using a MySQL connector in VB .Net to execute a batch of SQL
when I try to connect to my server through MySQL Connector/NET using SSL with
I'm using a mysql .NET Connector library (Mysql.Data) in my project. As far as
I have a C# .NET 3.5 application using the ADO.NET Driver for MySQL (Connector/NET).

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.