ID and Password--case sensitive

Last post 10-02-2007 7:16 AM by TejB. 7 replies.

Sort Posts:

  • ID and Password--case sensitive

    10-01-2007, 2:50 AM
    • Member
      point Member
    • TejB
    • Member since 08-13-2007, 1:35 AM
    • Posts 23

    I have a login page.I want  id and password  should only accept case sensitive value . I am developing the application in ASP.Net code behind C#.Net and Database SQL Server 2005.

    Thanks..

    Thanks,
    Tej
  • Re: ID and Password--case sensitive

    10-02-2007, 1:24 AM
    • Member
      point Member
    • TejB
    • Member since 08-13-2007, 1:35 AM
    • Posts 23

    I have a login page.I want only case sensitive value allow for login.Please send me the code.

    Thanks,
    Tej
  • Re: ID and Password--case sensitive

    10-02-2007, 2:44 AM
    • Contributor
      2,052 point Contributor
    • GillouX
    • Member since 06-03-2007, 3:28 PM
    • Luxemburg
    • Posts 562

     what does it mean : accept case sensitive ?

     

    it's case sensitive or not ... 

  • Re: ID and Password--case sensitive

    10-02-2007, 3:32 AM
    • Member
      point Member
    • TejB
    • Member since 08-13-2007, 1:35 AM
    • Posts 23

    if user name and password in database like---name and pass

    If i give NAME and PASS on login page it should not login.

    I want only after giving same record as in database like--name and pass

    should work.

    Thanks,
    Tej
  • Re: ID and Password--case sensitive

    10-02-2007, 3:59 AM
    Answer
    • Contributor
      2,052 point Contributor
    • GillouX
    • Member since 06-03-2007, 3:28 PM
    • Luxemburg
    • Posts 562

    If you make a normal compare, it s case sensitive

    String.Compare(s1, s2)

    if you want insensitive

     

    String.Compare(s1, s2, true)

     


     

  • Re: ID and Password--case sensitive

    10-02-2007, 4:21 AM
    Answer

    TejB:

    if user name and password in database like---name and pass

    If i give NAME and PASS on login page it should not login.

    I want only after giving same record as in database like--name and pass

    should work.

    If you are using forms authentication in asp.net 2.0 then setting passwordFormat="Hashed" in web.config will set the case sensitivity, because capital and non capital will form different hashes.

    You also have the option of HashPasswordforStoringInConfigFile method of formsauthentication class. Please note in this case passwords are case sensitive but not usernames.

    http://msdn2.microsoft.com/en-us/library/da0adyye.aspx

    If you are using other methods of authentication then perhaps using cryptography to create crypt of every username/password everytime you store will also solve this issue. 

    Please Mark Post that helped you as answer, also include a summary of what solved the problem as it helps others in similar situations
  • Re: ID and Password--case sensitive

    10-02-2007, 4:22 AM

    TejB:

    if user name and password in database like---name and pass

    If i give NAME and PASS on login page it should not login.

    I want only after giving same record as in database like--name and pass

    should work.

    If you are using forms authentication in asp.net 2.0 then setting passwordFormat="Hashed" in web.config will set the case sensitivity, because capital and non capital will form different hashes.

    You also have the option of HashPasswordforStoringInConfigFile method of formsauthentication class. Please note in this case passwords are case sensitive but not usernames.

    http://msdn2.microsoft.com/en-us/library/da0adyye.aspx

    If you are using other methods of authentication then perhaps using cryptography to create crypt of every username/password everytime you store will also solve this issue. 

    Please Mark Post that helped you as answer, also include a summary of what solved the problem as it helps others in similar situations
  • Re: ID and Password--case sensitive

    10-02-2007, 7:16 AM
    • Member
      point Member
    • TejB
    • Member since 08-13-2007, 1:35 AM
    • Posts 23

    thanx!!!!

    Thanks,
    Tej
Page 1 of 1 (8 items)