Newbie question (user data storage)

V

Vlad

Hi all.

Spent 4 years in asp.net, have never used System.Windows.Forms.Form class
before. Now I need to create a simple winform that will use some web service
to get/send user info. Sorry if the question looks dummy :)

In winforms, what's the best way to locally store user info (for instance,
email, password(s), some settings) that is related to specific user account
and that needs to be sent over the Net from time to time? Registry, .config
file, let user deside where to keep his/her data or something else? For
example, I need to verify user's credentials by sending them to a webservice
and load some xml data back from webservice if login/pass are fine. This
operation must happen every time user loads the form, so I need to store his
credentials and returned file somewhere on his machine. If particular
machine is being used by several users, each user must be able to load the
form/get his own xml with his own data. What is the best place to store it?
How to distinguish between users/acconts in that storage place?

Any help, advice, link to related article will be highly appreciated!!

Vlad.
 
V

Vlad

Thanks!!


Neno Loje said:
You can write it into XML files and place it in the appropriate user
settings directory (e.g. use LocalApplicationData from
Environment.SpecialFolder or ApplicationData with roaming - see details in
MSDN Library article below)

Environment.GetFolderPath
http://msdn.microsoft.com/library/d...fsystemenvironmentclassgetfolderpathtopic.asp

Environment.SpecialFolder
http://msdn.microsoft.com/library/d...fsystemenvironmentspecialfolderclasstopic.asp

Best,
--
Neno Loje [MVP C#]
http://www.dotnet-online.com


Vlad said:
Hi all.

Spent 4 years in asp.net, have never used System.Windows.Forms.Form class
before. Now I need to create a simple winform that will use some web
service to get/send user info. Sorry if the question looks dummy :)

In winforms, what's the best way to locally store user info (for
instance, email, password(s), some settings) that is related to specific
user account and that needs to be sent over the Net from time to time?
Registry, .config file, let user deside where to keep his/her data or
something else? For example, I need to verify user's credentials by
sending them to a webservice and load some xml data back from webservice
if login/pass are fine. This operation must happen every time user loads
the form, so I need to store his credentials and returned file somewhere
on his machine. If particular machine is being used by several users,
each user must be able to load the form/get his own xml with his own
data. What is the best place to store it? How to distinguish between
users/acconts in that storage place?

Any help, advice, link to related article will be highly appreciated!!

Vlad.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top