Solved

ASP.Net Membship Never Returns DuplicateEmail

Posted on 2009-05-18
1
185 Views
Last Modified: 2013-11-08
We have a site where users can register and all e-mail addresses should be unique.

I've got "requiresUniqueEmail" set to true in the web.config file. However the "DuplicateEmail" status is never returned, even when I create several accounts with the same e-mail address. All other status codes return fine.

I've done some reading and one guy has said that the duplicate e-mail functionality doesn't work correctly and he wrote a custom validator. Is this what I'm going to have to do or am I missing something? Thanks!
0
Comment
Question by:cfj_wagner
1 Comment
 
LVL 9

Accepted Solution

by:
cdaly33 earned 250 total points
ID: 24417394
I've used the requiresUniqueEmail feature many times and haven't had an issue with it.  Is it fully creating the user?  Try adding <clear /> to the line just above your membership provider declaration.

http://forums.asp.net/p/988826/1279896.aspx


<membership defaultProvider="Sql2000Provider">

   <providers>

      <clear />

      <add name="Sql2000Provider" type="System.Web.Security.SqlMembershipProvider"

                connectionStringName="Sql2000Services" applicationName="/211Reports"

               enablePasswordRetrieval="false" enablePasswordReset="false" requiresUniqueEmail="false"

               requiresQuestionAndAnswer="true" passwordFormat="Hashed"/>

   </providers>

</membership>

Open in new window

0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now