I created an Asp.net Web Form by Visual Studio 2015 update 3. Everything is as default.
I want to make a login form in my Windows Form Application using that Asp.Net database. But the password stored in the database is hashed, and I do not know what type of this hash is, so I could not compare those strings.
What is the default hashing of Asp.net Web Form or any other way to confirm the authentication?
Thanks.
Found solution: https://stackoverflow.com/a/20622428/6713381
Asked
Active
Viewed 689 times
0
-
Do you mean SQL Server login and password (validated on server layer), or custom login/password (validated on app layer)? – Anton Aug 17 '16 at 02:33
-
@Anton I mean the user will register on the Website then they can use that username/password to log in Winforms Application, any concept, just return success if username and password are correct. – Ken Aug 17 '16 at 03:22
1 Answers
0
Try to Compare Password in SQL Server Because MySQL has an md5 function. You can do the following presuming that the field for salt is called salt:
select 1 from tablename where Username= @Username and Password = MD5(salt + @password);
If It returns Row then Validated Succesfully.
It will Work
Dharti Sojitra
- 207
- 1
- 10
-
My database is MSSQL 2016. By the way, I changed that query to make it suitable in MSSQL but not return any row. I tried SHA512 and SHA256, but got nothing. – Ken Aug 18 '16 at 02:43