locked
Membership provider for MS Access in VB RRS feed

  • Question

  • User2106414830 posted

    Hi all,

    Over the past few weeks I've been attempting to convert the readily available C# code for the Membership Provider etc whilst working with MS Access. I'm fairly experienced with VB unlike C# and have ran AccessMembershipProvider.cs, AccessConnectionHelper.cs and so on through 3 different converters. All of which have given a varying degree of errors, all of which I've fixed, either by ever so slightly re-writing the logic or in the Cryptographic case finding a working translation.

    This evening I have fixed all of the errors from all of the now converted VB files (which I was pretty pleased about as you can imagine), I then created a simple login page to test this out, added a new user to the system and tried to login to find out I'm being told the username or password is wrong.

    Just to clarify, the converters all had an error or two or even more in some cases which I've bypassed but now I can't login - at all!!

    Any initial suggestions?

    Finally I've written reams of code over the years and am really stumped on this one, has knowone actually successfully converted these files from C# to VB and actually got it working?? I'm not looking for someone to send me there hard work but I am almost at the point of not wanting to bother with it anymore and I just can't believe that it's not out there to download.


    Is it even possible to go to VB for this?

    Cheers

    SS

    Friday, August 13, 2010 2:45 PM

Answers

All replies

  • User541108374 posted

    Hi,

    well actually you can simply use the C# files, put them in a class library and reference that in your VB.NET project.

    On the other hand, it seems to me that you're having problems with some pieces/methods of code to convert. Can you provide such pieces of code?

    Grz, Kris.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, August 13, 2010 4:37 PM
  • User2106414830 posted

    Hi,

    Many thanks for your reply

    The first ideas a good one, hadn't considered it - or even thought about it to be truthfull.

    Got a slight problem in that I run VWD Express and it doesn't support class libraries, could I compile a dll in C# Express (haven't downloaded it yet)?

    Thanks again

    SS

    Friday, August 13, 2010 5:17 PM
  • User-1199946673 posted

    could I compile a dll in C# Express (haven't downloaded it yet)?
     

     

    Yes you can. All is explained in this excellent article:

    http://imar.spaanjaars.com/404/using-the-microsoft-access-providers-to-replace-the-built-in-sql-server-providers

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, August 13, 2010 6:53 PM
  • User2106414830 posted

    Excellent, many thanks again!

    The article is superb and have it running without a problem.

    Just out of interest I also spotted another way. Basically add the following to the web.config file:

    <compilation>
      <codeSubDirectories>
        <add directoryName="CSharp"/>
        <add directoryName="VB"/>
      </codeSubDirectories>
    </compilation>

    and then just add the relevant folders and classes within the App_Code folder.

    It works ok but could it come back to haunt me in the future?

    Saturday, August 14, 2010 1:22 PM