Local System Current Username and Password
-
Hi Everyone, I ve my c# application, in that i want to set some settings in Registry. To authenticate the user i want the user to enter local system's current username and password. How can i verify the entered username and password? Any solution...?
Regards, -SIFAR.
-
Hi Everyone, I ve my c# application, in that i want to set some settings in Registry. To authenticate the user i want the user to enter local system's current username and password. How can i verify the entered username and password? Any solution...?
Regards, -SIFAR.
Avoid using the registry. Use the built-in user settings instead. As for the login stuff, I'm sure you'll find an answer if you google it. [EDIT] What you could do is use Windows authentication, and verify that the currently logged in user is within a certain group. The following criteria should probably be used to verify the user: 0) The required group must be defined on the box. 1) The currently logged-in user must be in the specified group. 2) (Optionally) The user must not be in the administrator group. If you don't want to use Windows Authentication, you could set up your own and use an XML file to hold user ID's and passwords (encrypted or hashed of course). [EDIT] This question inspired me to look into windows form login functionality, and I'm writing an article about it. If you can wait a few days, I'll post a reasonably complete solution (if I don't get bored with the whole thing in the process). The sample application is what will require the most time.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001modified on Thursday, October 2, 2008 10:28 AM
-
Hi Everyone, I ve my c# application, in that i want to set some settings in Registry. To authenticate the user i want the user to enter local system's current username and password. How can i verify the entered username and password? Any solution...?
Regards, -SIFAR.
Here's an article I wrote today about login. See if that's what you want. http://www.codeproject.com/KB/miscctrl/Application_Login.aspx[^]
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001 -
Avoid using the registry. Use the built-in user settings instead. As for the login stuff, I'm sure you'll find an answer if you google it. [EDIT] What you could do is use Windows authentication, and verify that the currently logged in user is within a certain group. The following criteria should probably be used to verify the user: 0) The required group must be defined on the box. 1) The currently logged-in user must be in the specified group. 2) (Optionally) The user must not be in the administrator group. If you don't want to use Windows Authentication, you could set up your own and use an XML file to hold user ID's and passwords (encrypted or hashed of course). [EDIT] This question inspired me to look into windows form login functionality, and I'm writing an article about it. If you can wait a few days, I'll post a reasonably complete solution (if I don't get bored with the whole thing in the process). The sample application is what will require the most time.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001modified on Thursday, October 2, 2008 10:28 AM