Creating a user profile

Last post 07-09-2009 7:27 PM by ppham. 1 replies.

Sort Posts:

  • Creating a user profile

    07-09-2009, 6:09 PM
    • Member
      4 point Member
    • jimverity
    • Member since 07-30-2008, 6:16 PM
    • Posts 29

     Hi,

    I am using a custom profile provider which works very well when I use the create user wizard, however I would like to know how I can do it in code.

    I can create a user using

     Membership.CreateUser

    and then I use

    Roles.AddUsertoRole

    to give the new user access rights, This seems to work fine but it does not actually create a  user profile.

    I have tried profilebase.createprofile ("username")

    but that did not seem to work. and when ever I try and access my profile editing page I get an error because it trys to lookup the profile from the database but it does not exist.

    I am using the HDIProfileProvider which I found on this site, do I need to add a new function to this to add the profile in.

     

    any help will be appreciated

    thanks

    James

  • Re: Creating a user profile

    07-09-2009, 7:27 PM
    Answer
    • Member
      62 point Member
    • ppham
    • Member since 08-13-2008, 1:46 PM
    • Orange County CA
    • Posts 22

    if you are building a new project to create users against an existing site. what the issue is probably that the application isn't set

    try reading

    http://weblogs.asp.net/scottgu/archive/2006/04/22/Always-set-the-_2200_applicationName_2200_-property-when-configuring-ASP.NET-2.0-Membership-and-other-Providers.aspx

    if you look into your sql db. you'll probably see your users under another applicationid.

Page 1 of 1 (2 items)