Microsoft ASP.NET Member/Role Management with IIS (VB Version)
Thursday 15 February 2007 @ 1:08 pm

Microsoft ASP.NET Member/Role Management with IIS (VB Version)

The Visual Basic Version of the Objects!

Back in January of 2006, I published on MSDN an article and source code for managing ASP.NET 2.0 Membership users with an ObjectDataSource.  Since I'm not much of a VB person, I only published them in c#.  since then, I've had hundreds of requests for this code in VB.  Until now, I've had to send an excuse for not having it.  Now, thanks to Dave at Tangible Solutions Software, we now have a VB version.  Dave converted it with there conversion software called Instant VB.

The following zip file includes these VB objects along with a very simple aspx page in VB.  It does not include any more complete examples of using the objects because the code associated with the aspx pages I wrote is all in c#.  If anyone wants to convert the other pages, I'd be happy to post those also.

Thanks Dave and Thanks Tangible Solutions!

http://peterkellner.net/DownLoads/MembershipEditorVB.zip

- Posted in ASP.NET 2.0, ObjectDataSource  




10 Responses to “Microsoft ASP.NET Member/Role Management with IIS (VB Version)”

  1. Jonathan Cummins Windows XP Mozilla Firefox 2.0.0.1 Says:

    Hi,

    I have converted the Membership Editor to VB if anybody wants to use it.

    Its located at:

    http://www.mindup.no/MembershipEditor.zip

    Regards,

    Jonathan Cummins

  2. Shaggy126 Windows XP Internet Explorer 6.0 Says:

    I noticed that you’ve stated IIS 5.1 and 6

    I’m running a 2000 server, IIS 5.0 with .net 2.0 and SQL2005 express. I was planning to used the VB version that was put online.

  3. Emilio Windows XP Internet Explorer 7.0 Says:

    Has anybody upgraded this membership solution to the current ASP.NET AJAX Extensions 1.0 ?

    I am not familiar with this stuff so my conversion, although it appears to run, it gives an error “Web: undefined” for line 96, character 1 of the TextChangedBehaviour.js loaded in the ASPX page.

  4. Ron Sloan Windows XP Internet Explorer 7.0 Says:

    The aspx page included is written in C#. Do you have the VB version?

    Thanks

  5. Tim Windows XP Internet Explorer 7.0 Says:

    OK - I have tried both the C# and the VB version of this. I get the same error in both. Any help would be appreciated as I would truly like to use this feature. When I click on SELECT for any of the rows I get this error.

    The error is:

    Value cannot be null.
    Parameter name: username
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.ArgumentNullException: Value cannot be null.
    Parameter name: username

    Source Error:

    Line 62:
    Line 63: ‘ cover case where there is no current user
    Line 64: If Not Membership.GetUser() Is Nothing Then
    Line 65: ObjectDataSourceRoleObject.SelectParameters(”UserName”).DefaultValue = Membership.GetUser().UserName
    Line 66: ObjectDataSourceRoleObject.SelectParameters(”ShowOnlyAssignedRolls”).DefaultValue = “true”

  6. ronald Windows XP Internet Explorer 7.0 Says:

    do u have a script in C# where i can delete a certain role using

  7. Rae MacLeman Windows XP Internet Explorer 6.0 Says:

    Hi,

    The Membership Editor looks great, but can anyone advise a newbie on how to configure the ObjectDataSource, please? I have used the Website Admin Tool and created several roles and users, but the configure process seems to be looking for a data source in my App_Data folder.

    Regards
    Rae MacLeman

  8. Abhi Mittal Mac OS X Safari 522.12.1 Says:

    Hi,

    I was wondering if anybody could help me get the C# version working with an Access Database provider? I am using the sample Access Provider from Microsoft.

    Thanks

  9. Chad Snyder Windows XP Internet Explorer 7.0 Says:

    I’m using the VB version (very nice, thx) but when I try to edit a user I get an error msg:

    “ObjectDataSource ‘ObjectDataSourceMembershipUser’ could not find a non-generic method ‘Update’ that has parameters: Email, IsApproved, IsLockedOut, Comments, lastActivityDate, LastLoginDate, UserName.:”

    Can you help?

    Thanks
    Chad

Leave a Reply