Sharring Application Settings Best Practive
-
jeudi 2 août 2012 21:57I wanted to know what the best way to share application setting over a network for any user who uses the application to read and update the settings? I was thinking maybe and XML file. But concerned about read and write with simultaneous users. Would an access database be acceptable for this?
Toutes les réponses
-
jeudi 2 août 2012 22:49
I don't know if there is a "best" practice since there are so many variables involved. However, I think it is entirely appropriate that if individual users can manage their own settings for the application then you would save those settings in a file in the dynamically mapped special folder LocalApplicationData (for non-roaming users). There may be a more appropriate one for your situation so I recommend you look here for details: http://msdn.microsoft.com/en-us/library/system.environment.specialfolder.aspx
- Marqué comme réponse Mark Liu-lxfModerator jeudi 9 août 2012 09:12
-
vendredi 3 août 2012 01:11
I should add that there is nothing inherently wrong with storing settings in a central repository like a common XML file or a database. I've found an easy way to create XML settings is to use a DataTable to store the values in a single row (a column for each setting) and then use the ReadXML and WriteXML methods. This allows the table to perform the serialization for you. The XML file technique can work equally well for a common file or individual files.- Marqué comme réponse Mark Liu-lxfModerator jeudi 9 août 2012 09:12

