dbmembership provider same user name problem

Topics: ASP.NET 2.0, Controls
May 13, 2009 at 12:33 AM

hi,

i've changed all of providers to db (dbmembership, dbrole...) and i've created a signup page with create user wizard tool.. everything was working cool.. but when i was trying sign up with same username and e-mail it didnt give me an error.. i checked my db(mssql) for users and there was two user with same username and e-mail.. i've tried so hard but i cant handle that error.. there was no error or app crash but unique user name problem is not an acceptible thing you know.. i hope i can find an answer for this problem and i can totally personalize blog for me.. i wanna also enabling the password retrieval and and take secret question and answer during signing up..

my goal is, anyone who wanna post a comment, he have to sign up.. sorry about my english..

thanks for ur any helps or answers..

May 13, 2009 at 11:54 PM

i changed dbmembershipprovider.cs file like this but nothing changed..

start from line 625:

        public override bool EnablePasswordRetrieval

        {

            get { return true; }

        }

 

        /// <summary>

        /// Hardcoded to false

        /// </summary>

        public override bool EnablePasswordReset

        {

            get { return true; }

        }

 

        /// <summary>

        /// Hardcoded to false

        /// </summary>

        public override bool RequiresQuestionAndAnswer

        {

            get { return true; }

        }

 

        /// <summary>

        /// Returns the application name as set in the web.config

        /// otherwise returns BlogEngine.  Set will throw an error.

        /// </summary>

        public override string ApplicationName

        {

            get { return applicationName; }

            set { throw new NotImplementedException(); }

        }

 

        /// <summary>

        /// Hardcoded to 5

        /// </summary>

        public override int MaxInvalidPasswordAttempts

        {

            get { return 5; }

        }

 

        /// <summary>

        /// Not implemented

        /// </summary>

        public override int PasswordAttemptWindow

        {

            get { throw new NotImplementedException(); }

        }

 

        /// <summary>

        /// Hardcoded to false

        /// </summary>

        public override bool RequiresUniqueEmail

        {

            get { return true; }

        }