I have a login form that has Username and password as inputs from user and I want to validate these login credentials from a text file. How can I do it? I know how to write data and read data..but how to read only specific data.or check whether username password combination exists or not.
Share
Is there any reason you have to use a plain text file? As Joshua says this is a poor way to store security information.
In .NET a standard approach is to use an application configuration file to store username/password (eg. app.config or web.config) and encrypt the password using the Data Protectction API (DPAPI) or the System.Security.Cryptography.ProtectedData class.
Jon Galloway provides a decent tutorial on how to do this.