Exception adding user with no email

Discussion in 'ASP .Net Security' started by David Thielen, Jun 12, 2006.

  1. Hi;

    When I add a user using the SqlMembershipProvider (I have
    requiresUniqueEmail="false") and use CreateUser(name, password) - ie no email
    address, the user is created but CreateUser throws an exception saying the
    user already exists.

    Any idea why?

    --
    thanks - dave
    david_at_windward_dot_net
    http://www.windwardreports.com
    David Thielen, Jun 12, 2006
    #1
    1. Advertising

  2. Hello Dave,

    The problem may not be with email since you have set
    requiresUniqueEmail="false", have you double check if the user has existed
    in the database? You may open the ASP.NET Web Site Administration Tool ,
    select Security/Manage Users, you can see all registered users here, and
    you can try a different user name again to see if it can work.

    Regards,

    Luke Zhang
    Microsoft Online Community Support

    ==================================================
    When responding to posts, please "Reply to Group" via your newsreader so
    that others may learn and benefit from your issue.
    ==================================================

    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)
    Luke Zhang [MSFT], Jun 13, 2006
    #2
    1. Advertising

  3. The user did not exist (I had 0 when I first started testing this). And once
    I gave them an email it worked. I think the SqlMembership code may require an
    email - it doesn't have to be unique but it can't be null.

    --
    thanks - dave
    david_at_windward_dot_net
    http://www.windwardreports.com



    "Luke Zhang [MSFT]" wrote:

    > Hello Dave,
    >
    > The problem may not be with email since you have set
    > requiresUniqueEmail="false", have you double check if the user has existed
    > in the database? You may open the ASP.NET Web Site Administration Tool ,
    > select Security/Manage Users, you can see all registered users here, and
    > you can try a different user name again to see if it can work.
    >
    > Regards,
    >
    > Luke Zhang
    > Microsoft Online Community Support
    >
    > ==================================================
    > When responding to posts, please "Reply to Group" via your newsreader so
    > that others may learn and benefit from your issue.
    > ==================================================
    >
    > (This posting is provided "AS IS", with no warranties, and confers no
    > rights.)
    >
    >
    David Thielen, Jun 13, 2006
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Peter
    Replies:
    0
    Views:
    3,328
    Peter
    Jul 1, 2003
  2. John Silver
    Replies:
    0
    Views:
    597
    John Silver
    Feb 4, 2005
  3. Tee

    Email ErrorPage to email

    Tee, Jun 23, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    365
  4. Travis Pruitt

    Dynamically Adding User Control with Child User Control

    Travis Pruitt, Jan 13, 2005, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    170
    Travis Pruitt
    Jan 13, 2005
  5. Replies:
    5
    Views:
    107
Loading...

Share This Page