save or register password for next login form ...
-
Hi every one ! I have two form : First Form for enter username and pass and Form2(Main Form). I want to save or register password and username if the user enter a valid pass . And for the next time , if the user execute this app , go to the main form directly. (because for the first time he enter a valid pass). thanks for any help !
-
Hi every one ! I have two form : First Form for enter username and pass and Form2(Main Form). I want to save or register password and username if the user enter a valid pass . And for the next time , if the user execute this app , go to the main form directly. (because for the first time he enter a valid pass). thanks for any help !
-
Hi every one ! I have two form : First Form for enter username and pass and Form2(Main Form). I want to save or register password and username if the user enter a valid pass . And for the next time , if the user execute this app , go to the main form directly. (because for the first time he enter a valid pass). thanks for any help !
You can store user's pwd in registry by using Microsoft.Win32.RegistryKey class.
-
You can store user's pwd in registry by using Microsoft.Win32.RegistryKey class.
thanks, for ur guide! here is my code :
using Microsoft.Win32;
...
else if (.....)
{
RegistryKey mypass =
Registry.CurrentUser.CreateSubKey("mypass");
using (RegistryKey
myName = mypass.CreateSubKey("myName"),
mySettings = mypass.CreateSubKey("mySettings"))
{
mySettings.SetValue("mypass", "Secret");
}
WorkForm.ShowDialog();
}but it don't create anything in HKEY_CURRENT_USER in RegEdit . thanks !
-
thanks, for ur guide! here is my code :
using Microsoft.Win32;
...
else if (.....)
{
RegistryKey mypass =
Registry.CurrentUser.CreateSubKey("mypass");
using (RegistryKey
myName = mypass.CreateSubKey("myName"),
mySettings = mypass.CreateSubKey("mySettings"))
{
mySettings.SetValue("mypass", "Secret");
}
WorkForm.ShowDialog();
}but it don't create anything in HKEY_CURRENT_USER in RegEdit . thanks !
Saving the users password in clear text in the registry? Now if THAT's not a security risk, I don't know what is.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak -
Saving the users password in clear text in the registry? Now if THAT's not a security risk, I don't know what is.
A guide to posting questions on CodeProject[^]
Dave Kreskowiakin fact I want to save pass in registry system (and whenever the user execute app. , the mainform displayed directly). thanks!
-
in fact I want to save pass in registry system (and whenever the user execute app. , the mainform displayed directly). thanks!
So what?? You NEVER EVER EVER EVER store a password in the registry. If you have a user that is logged in, you flag that the user is logged in on the server side. You also keep a piece of data the client sends to the server that says the client is logged in on that particular machine. This keeps the client secured so the password cannot be stolen.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak -
So what?? You NEVER EVER EVER EVER store a password in the registry. If you have a user that is logged in, you flag that the user is logged in on the server side. You also keep a piece of data the client sends to the server that says the client is logged in on that particular machine. This keeps the client secured so the password cannot be stolen.
A guide to posting questions on CodeProject[^]
Dave KreskowiakThanks Dave ,and You Are Right , But it's only an application(windows form) that execute in the local machin (there is no server for this).
-
Thanks Dave ,and You Are Right , But it's only an application(windows form) that execute in the local machin (there is no server for this).
Then what's the point of logging in??
A guide to posting questions on CodeProject[^]
Dave Kreskowiak -
Then what's the point of logging in??
A guide to posting questions on CodeProject[^]
Dave KreskowiakI create an App. that's execute in PC and I want to avoide to any copy from the App. so in the form1 I set to get the CPU ID , so after the user call me to get the Pass , he can Open to the Main Form . So the pass must be save in a file or registry system , until , whenever he want to execute the app. , Main form open ... . ( this is my story ;)
-
I create an App. that's execute in PC and I want to avoide to any copy from the App. so in the form1 I set to get the CPU ID , so after the user call me to get the Pass , he can Open to the Main Form . So the pass must be save in a file or registry system , until , whenever he want to execute the app. , Main form open ... . ( this is my story ;)
nassimnastaran wrote:
and I want to avoide to any copy from the App.
There's no such thing as copy protection that actually works. CPU ID is disabled by default on most systems because of privacy concerns and is not even implemented on the newest Intel CPUs and AMD never implemented it at all on any of there CPU's. So, CPUID is useless as an identifier. What you're talking about is a registration key. This is normally encrypted and stored in the registry in several locations. When the app is run (no login form required) the value is read back and decrypted and verified.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak