createuserwizard1 and i dont want to Non-alphanumeric character for password :) how can i do this ?

Last post 07-23-2008 1:35 AM by oguzkaygun. 12 replies.

Sort Posts:

  • createuserwizard1 and i dont want to Non-alphanumeric character for password :) how can i do this ?

    06-05-2008, 8:39 AM

    hello friends

    i have createuserwizard1 and i dont want to  Non-alphanumeric character for password when anybody create new account:) how can i do this ?

    cheers

    Mark as me if my question or my answer can be helpful for you :)
  • Re: createuserwizard1 and i dont want to Non-alphanumeric character for password :) how can i do this ?

    06-05-2008, 12:12 PM
    Answer
    • All-Star
      16,914 point All-Star
    • guru_sarkar
    • Member since 08-30-2007, 8:00 PM
    • Posts 2,556

    you can do that in web.config in membership section

    this is default in your machine.config....add it to your webconfig to override the default and do whatever customization you want...see the bold one below

    <membership>
          <providers>
            <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="LocalSqlServer" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" applicationName="/" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="1" passwordAttemptWindow="10" passwordStrengthRegularExpression="" />
          </providers>
        </membership>

  • Re: createuserwizard1 and i dont want to Non-alphanumeric character for password :) how can i do this ?

    06-13-2008, 3:15 AM

    hi

    when i write anything to web.config, i see underline code error.. and my web site doesnt run :) is there else way for this ?

    cheers

    Mark as me if my question or my answer can be helpful for you :)
  • Re: createuserwizard1 and i dont want to Non-alphanumeric character for password :) how can i do this ?

    06-13-2008, 12:07 PM
    • All-Star
      16,914 point All-Star
    • guru_sarkar
    • Member since 08-30-2007, 8:00 PM
    • Posts 2,556

    what does the error say ..? can you clarify a bit more...

  • Re: createuserwizard1 and i dont want to Non-alphanumeric character for password :) how can i do this ?

    07-22-2008, 5:44 AM

    hi me again :)

    i have no solved this problem still.. when i write to web.config below code linew i see error that

    when i write below code to in <system.web>, i have no error but when i change minRequiredNonalphanumericCharacters="1" to

    minRequiredNonalphanumericCharacters="0", i have error again.. what should i do ?

    Satır 159:	</runtime>
    Satır 160:
    Satır 161:  <membership>
    Satır 162:    <providers>
    Satır 163:      <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="LocalSqlServer" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" applicationName="/" requiresUniqueEmail

     

    Mark as me if my question or my answer can be helpful for you :)
  • Re: createuserwizard1 and i dont want to Non-alphanumeric character for password :) how can i do this ?

    07-22-2008, 11:44 AM
    • All-Star
      16,914 point All-Star
    • guru_sarkar
    • Member since 08-30-2007, 8:00 PM
    • Posts 2,556

    can you share your web.config and what does the error say??

  • Re: createuserwizard1 and i dont want to Non-alphanumeric character for password :) how can i do this ?

    07-22-2008, 4:28 PM

    i have solved this problem :)

    i puted your code to between <system.web></system.web> and it runs now

    but i have problem with pasword recovery.. i cant use it.. i have gmail account and how can i use pasword recovery ?

    could you learn me ?

    Sincerely

    Mark as me if my question or my answer can be helpful for you :)
  • Re: createuserwizard1 and i dont want to Non-alphanumeric character for password :) how can i do this ?

    07-22-2008, 4:44 PM
    • All-Star
      16,914 point All-Star
    • guru_sarkar
    • Member since 08-30-2007, 8:00 PM
    • Posts 2,556

    I tried this a while ago... but here is the basic idea...  

    this is something you got to put in your web.config ..

    <system.net>

    <mailSettings>

    <smtp from="yourfromemail">

    <network defaultCredentials="false"

    userName=YourUserName@gmail.com

    password="xxxxx" host="smtp.gmail.com" port="587"/>

    </smtp>

    </mailSettings>

    </system.net>

    and in your passwordRecovery control's Sending Mail event something like this..

    protected void PasswordRecovery1_SendingMail(object sender, MailMessageEventArgs e)

    {

     

    MailMessage mm = new MailMessage();

    mm.From = e.Message.From;

    mm.Subject = e.Message.Subject.ToString();

    mm.To.Add(e.Message.To[0]);

    mm.Body = e.Message.Body;

    SmtpClient smtp = new SmtpClient(); smtp.EnableSsl = true;

    smtp.Send(mm);

    e.Cancel =
    true;

     

    }

     

  • Re: createuserwizard1 and i dont want to Non-alphanumeric character for password :) how can i do this ?

    07-22-2008, 5:10 PM

    hi thank you for your relpy :) but i have problem

    i have error message like this  System.FormatException when i click send button of password recovery what should i do ? 

    i wrote below code

    Protected Sub PasswordRecovery1_SendingMail(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.MailMessageEventArgs) Handles PasswordRecovery1.SendingMailDim mm As New MailMessage()

    mm.From = e.Message.From

    mm.Subject = e.Message.Subject.ToString()

    mm.[To].Add(e.Message.[To](0))

    mm.Body = e.Message.Body

    Dim smtp As New SmtpClient()

    smtp.EnableSsl = True

    smtp.Send(mm)

    e.Cancel = True

    End Sub

    <system.net>

    <mailSettings>

    <smtp from="oguzkaygun">

    <network defaultCredentials="false"

    userName="oguzkaygun@gmail.com"  i tried for only oguzkaygun

    password="******" host="smtp.gmail.com" port="587"/>

    </smtp>

    </mailSettings>

    </system.net>

     

     

    Mark as me if my question or my answer can be helpful for you :)
  • Re: createuserwizard1 and i dont want to Non-alphanumeric character for password :) how can i do this ?

    07-22-2008, 5:30 PM
    • All-Star
      16,914 point All-Star
    • guru_sarkar
    • Member since 08-30-2007, 8:00 PM
    • Posts 2,556

    not sure...seems

    which line is throwing an exception .... ??

    also try setting.. <smtp from="oguzkaygun@gmail.com">  and also in your are you specifying <MailDefinition> for your password RecoveryControl

  • Re: createuserwizard1 and i dont want to Non-alphanumeric character for password :) how can i do this ?

    07-22-2008, 5:38 PM

    it runs :) it send e mail to my hotmail but i have problem again

    my password is mmmmmmm

    but e mail show K*f=cYE/dNBd_)  as my password

    my password doesnt be K*f=cYE/dNBd_) certanly :)

    what can problem be ?

     

    Mark as me if my question or my answer can be helpful for you :)
  • Re: createuserwizard1 and i dont want to Non-alphanumeric character for password :) how can i do this ?

    07-22-2008, 5:51 PM
    • All-Star
      16,914 point All-Star
    • guru_sarkar
    • Member since 08-30-2007, 8:00 PM
    • Posts 2,556

    that is your passwordformat for membership provider is hashed ...and the membership system is actually resetting your password

    so now you can use ChangePassword control and reset it to whatever you want....

  • Re: createuserwizard1 and i dont want to Non-alphanumeric character for password :) how can i do this ?

    07-23-2008, 1:35 AM

    hi thank you for your reply :)

    how can i use change password control ?

    i have used nonalphanumeric=0 so is it problem ?

    could you learn me how can i get my password as mmmmmm at mail adress ? (mmmmmm is  real user password)

    sincerely

    Mark as me if my question or my answer can be helpful for you :)
Page 1 of 1 (13 items)