I'm trying to hash passwords for a login system with the FormsAuthentication.HashPasswordForStoringInConfigFile() function. I have a test button click function for this purpose:
protected void button_Click(object sender, EventArgs e)
{
label.Text = FormsAuthentication.HashPasswordForStoringInConfigFile(password.Text, "SHA1");
}
It works fine when I put this within the <script> tags on the same page but when I cut and paste the same function in a separate code file, it doesn't work. It says FormsAuthentication does not exist in this context.
Please help?
P.S: I am not salting the passwords and don't need to right now. Thanks.
...
Go to the complete details ...