TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Cynthia
NA
215
35.9k
How to save username & password locally in .Net application?
May 29 2017 6:31 AM
I am creating a login screen for which i have to save username & password locally so that next time when user login it doesn't ask for login .
I have used this code to save
Configuration config = System.Configuration.ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
config.AppSettings.Settings.Add("UserName"username);
config.AppSettings.Settings.Add("Password ",userpasssword);
config.Save();
System.Configuration.ConfigurationManager.RefreshSection("appSettings");
I am working in debug mode in VS2015 , first the username & password are written to myapp.vshost.exe.config file & once i close application , it is not saved . So, next time when user login ,again it will ask for password .
My question are -:How it will be saved permanently so that it exists even if application is closed so that next time when user login it doesn't ask for login credentials ?
is my approach correct or not ?
Reply
Answers (
1
)
Disable a button on show of form in mvvm wpf
Resource file are not creating properly