ASP.Net Membership & Roles Using MySQL- Basics Needed.

Discussion in 'ASP .Net' started by DanWeaver, Apr 10, 2008.

  1. DanWeaver

    DanWeaver Guest

    I am trying to use a MySQL db hosted on a shared server as an ASP.NET
    Membership Provider and .net framework 3.5 (visual studio 2008)
    I am new to a lot of this and have found the following websites which
    offer some degree of help but by no means a complete solution or
    uncomplicated explanation of whats involved:

    Very good but not complete enough for my level eg:
    "<add name="MySQLMembershipProvider" autogenerateschema="true" ...."

    Looks initially promising and the kind of solution simplicity I would
    expect in reality but...
    the first stage of the proceeedings doesnt work out for me on my vista
    c:\Windows\Microsoft.NET\Framework>aspnet_regsql -W
    'aspnet_regsql' is not recognized as an internal or external command,
    operable program or batch file.

    Many credible sources point to this page but running MySQL
    Administrator and trying to execute the sql to alter tables I run into
    syntax errors the origins of which I dont yet understand.

    Not sufficiently detailed.

    Can anyone point me to a reasonable set of instructions to SETUP ASP
    Visual Studio 2008 and its Login, New Member etc wizards and

    I would really appreciate any help.

    Dan - posted also to comp.MySQL
    DanWeaver, Apr 10, 2008
    1. Advertisements

  2. I would look up Custom Membership Provider. You will have to create one to
    use MySQL instead of a supported database.
    Cowboy \(Gregory A. Beamer\), Apr 11, 2008
    1. Advertisements

  3. DanWeaver

    DanWeaver Guest

    A few hard hours later and I am very frustrated- there seems to be
    very little support for MySQL regarding this seemingly basicish task-
    is it the case that to use MySQL in this scenario you have to be a
    hardcore ASP/SQL/general programmer? I cannot find a single video that
    illustrates anything like this concept nor any straigtforward,
    complete, relatively up to date guidelines. From an outsiders point of
    view it seems like the guys at MySQL have done all the hard work
    designing the right stuff- but insufficient support exists to
    encourage MySQLs use in this manner.
    I want to manage users and roles and get some information such as age
    group on a shared server preferably using MySQL. I have now lost 2
    days looking in vain through very technical and complicated half-
    descriptions of how to build an operating system on a spacestation
    from scratch- I am only trying to build a hello world roles and
    membership on a shared MySQL server, its like reading Microsoft help
    files... Is it really that hard?
    DanWeaver, Apr 11, 2008
  4. DanWeaver

    DanWeaver Guest

    Later still and...

    I believe a few steps are necessary and Im not sure of the order or
    exactly how to go about them:

    A) Create the DB schema on a (shared host) MySQL db... Does anybody
    have the SQL already made?

    B) Set up the asp project to have a reference to the correct provider
    ie do something in web.config relating to <providers> and <connection

    C) Change the ASP.NET Web Site Administration Tool to 'know' that
    we're now using a remote provider...

    D) Any other mystical steps involving importing namespaces etc...

    Any takers?
    DanWeaver, Apr 11, 2008
  5. First a google search yields:

    This should solve most of your needs. It has both the scripts to create the
    database and the custom membership provider. This is an "out of box"
    implementation, meaning it mimics the standard ASP.NET implementation.

    Note that the article states you need the latest MySQL Connector:

    There is a cost if this is a commercial site.

    If this is not acceptable, thsi one might work:

    And the MySQL forum has one as well:,63403,63403
    Cowboy \(Gregory A. Beamer\), Apr 11, 2008
  6. DanWeaver

    sloan Guest

    C) Change the ASP.NET Web Site Administration Tool to 'know' that
    we're now using a remote provider...

    I believe the WSAT tool is only available locally.....I learnt this the hard
    Thus my opinion is that is is a hobbyist tool, and not worth the effort.

    You probably don't want to hear this, but I'll give you the advice anyways.

    Go here:

    And take a hour or so ... and get the crappy Access Membership Provider
    Try not to just look at the code setup/config setup, but actually get it

    You'll learn the key items needed to swap out to a custom one.


    Then approach the MySql version with that knowledge.
    Once you get one working..the others seem easier.
    I suggest the Access one becaue at least you have one that differs
    signficantly from Sql Server...but is decently documented.


    I did this (a year and half ago) and that little exercise still sits with I can swap out to a custom one quickly now.

    This might help as well.
    sloan, Apr 11, 2008
  7. DanWeaver

    DanWeaver Guest

    Thanks very much Greg and Sloane,

    Greg- the KB code project looks worth a shot- the MySQLcode is like
    French to me!

    Sloane- thanks for the sage and frank advice, Ill have a good look at
    the 4guys.

    DanWeaver, Apr 11, 2008
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.