remember credentials
-
hi guys, I have a question, I want to know how I can store credentials(username, password) once they will be entered and if the user checks the checkbox that he wants to have them stored, so they will not care about typing again when they will visit again the app. It's not a web app, it's a desktop app. Thanks in advance
-
hi guys, I have a question, I want to know how I can store credentials(username, password) once they will be entered and if the user checks the checkbox that he wants to have them stored, so they will not care about typing again when they will visit again the app. It's not a web app, it's a desktop app. Thanks in advance
-
hi guys, I have a question, I want to know how I can store credentials(username, password) once they will be entered and if the user checks the checkbox that he wants to have them stored, so they will not care about typing again when they will visit again the app. It's not a web app, it's a desktop app. Thanks in advance
However you like. Registry/XML/app config/database/whatever
Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
hi guys, I have a question, I want to know how I can store credentials(username, password) once they will be entered and if the user checks the checkbox that he wants to have them stored, so they will not care about typing again when they will visit again the app. It's not a web app, it's a desktop app. Thanks in advance
there are many ways to get your goal, store them to file, registry or configuration file(AppSettings), for example, you just store them to your configuration file, if the setting key is exist and its value not empty then use them as stored credential data, but you must encoded them for security purpose dhaim program is hobby that make some money as side effect :)
-
hi guys, I have a question, I want to know how I can store credentials(username, password) once they will be entered and if the user checks the checkbox that he wants to have them stored, so they will not care about typing again when they will visit again the app. It's not a web app, it's a desktop app. Thanks in advance
Write a file that contains this information and read it back in later on. This is consistent with the way that websites do it using cookies.
using (IsolatedStorage storage = IsolatedStorage.GetUserStorForDomain())
{
using (IsolatedStorageFileStream fs = new IsolatedStorageFileStream("MySession.xml", FileMode.Create, storage)
{
// Write the "cookie"...
fs.Close();
}
}To read it back in...
using (IsolatedStorage storage = IsolatedStorage.GetUserStorForDomain())
{
using (IsolatedStorageFileStream fs = new IsolatedStorageFileStream("MySession.xml", FileMode.Open, storage)
{
// Read the "cookie"...
fs.Close();
}
}The advantage of this method (using IsolatedStorage) is that it can only be read by the user/assembly that created it, and is completely Vista friendly.
Deja View - the feeling that you've seen this post before.