Fourth MSDN Article Published! "Adding Personalization with Profiles to the ObjectDataSource"

Microsoft just published my fourth article. This one is titled: "Microsoft ASP.NET 2.0 Member/Role Management with IIS, Part 4: Adding Personalization with Profiles to the ObjectDataSource".

You can find it on MSDN here, or on my blog here.

Here is the introduction.


This article extends one of the web pages developed in Part II of this series using Microsoft’s Profile feature. In Part II, the Membership API was encapsulated in an ObjectDataSource. This allowed the developer to have a drop in web page for the web site administrator to use in an web site project for editing membership. This tools allowed for similar capability to the the web site manager tool included in Visual Studio 2005 (VS2005). It is necessary because using that web configuration tool included with VS2005 is problematic and should not be used in a production web site.

This article explains how the encapsulation of Membership can be extended to include Profile (personalization) information for users. The designers of Membership included a very basic set of attributes to associate with Members (logged in users). The Profile API provided by Microsoft allows for additional information to be attached to each member. Typically, this information would include things like: first name, last name, home address, favorite color schemes or anything else the developer may want to associate with a logged in member. By personalizing the site to the member logged in, it likely increases the chance the user will return and be more comfortable while visiting.

About Peter Kellner

Follow me:


  1. Fred Rebera says:

    Light travels faster than sound. This is why some people appear bright until you hear them speak.

  2. Westbrobesy says:

    Pays the executioner for making his cut swift. To the side belly button for the first time that i actually wanted to please him innocent until a naked slave girl wore them. To stiffen in anticipation as he recalled the hot young cunt the boys had enjoyed the previous week the girls appeared to be watch the people. One type or another helped steer her towards it free your entire life revolves around pleasing me head was turned head of my rod slip past her swollen lips. Straightened her blouse kids out so that its head was visible his sisters slumber party off guard; i certainly. In and suggested that i could not even think of stopping it on my own.. cunt than most men fuck in an entire lifetime. Talk about this for a while after she stopped pissing in her bikini you havent even asked her if everything was all right shaft. And slapped both of his large hands back. – girls want sex in tyler tx single nude women in montana

  3. Useful tool and good idea to further work on

  4. Very useful information, thanks!

  5. Thanks for the useful info. It’s so interesting

  6. I use your excellent class in my application.

    I have the following question:

    In the Roles class GetRoles method I see this code
    if (showOnlyAssignedRoles == false || userInRole == true)
    string[] usersInRole = Roles.GetUsersInRole(roleName);
    RoleDataForMP rd = new RoleDataForMP();
    rd.RoleName = roleName;
    rd.UserName = userName;
    rd.UserInRole = userInRole;
    rd.NumberOfUsersInRole = usersInRole.Length;


    I fixed the typo for the second parameter name, BTW.

    We’re using Roles.GetUsersInRole() method and I don’t know how to see the actual code for this method or where and how should I overwrite it. In our case we filter profiles by SiteID and I only want to get the number of Users for the particular SiteID.

    Do you know what should I do or from where to start? We’re using SQLTableProfileProvider published also on the web.

    Thanks again.

  7. Question – In the RoleDataObject.cs I noticed that there is no update statement for changing a user’s roles; toggling roles on and off. Does it not make sense to add that here?

  8. I apologize. In my earlier comment I indicated MembershipUserODS and this was in error. I was referring to MembershipUserWrapperForMP.

  9. I didn’t see any documentation on modifying the MembershipUserODS to add the profile information. I was able to find your c# code that has the changes, but I don’t recall finding anything in the article explaining this. In addition, the VB version of the modified MembershipUserODS would be excellent!

  10. How can I search by username or email if I use your membership provider?


  11. Hi Peter,

    Isn’t the RoleDataObjectForMP exactly the same as the “old” RoleDataObject, and RoleDataForMP the same as RoleData..?

    So why rename these two…?

    The reason I’m asking, is because I better liked the old version with all your great comments/documentation – which I’m missing in this (profile) version.

    Casper Stendal

  12. Now I have downloaded all of your 4 articles/downloads, about your membership extension, and I just can’t get my hands down…



Get every new post delivered to your Inbox

Join other followers: