Exception adding user with no email

D

David Thielen

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?
 
L

Luke Zhang [MSFT]

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.)
 
D

David Thielen

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top