Franklin,

That is a very good point I did not mention. Isolated storage will work
for the current machine the user is on, as well as any other machine the
user logs into if they have a roaming profile setup. But if this is a
web application, or if the user needs to use it from any other location,
then storing the preferences in a database would probably be preferable.

Brian

-----Original Message-----
From: franklin gray [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, April 16, 2002 4:49 PM
To: [EMAIL PROTECTED]
Subject: Re: [DOTNET] Saving application settings...


Also keep in mind.  Do you want the user preferences to work on only one
machine or do you want them to work on any machine the user logs in
from?  If it is the later, then I suggest you store these settings in
the DB or whatever data storage you are using.

-----Original Message-----
From: Brian G. Vallelunga [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 16, 2002 3:05 PM
To: [EMAIL PROTECTED]
Subject: Re: [DOTNET] Saving application settings...


Andrew,

This has been talked about many times before on this list and on usenet,
I'd go looking through the archives. That said, there is no easy way to
use the AppSettings to save to the file. You have a few options:

1) If you're just saving program configuration settings, you can write
something that reads and rewrites the normal config file.
2) If you are saving user preferences, then you might want to consider
writing your own utility class that saves settings to an XML file and
store it in Isolated Storage.
3) You can use the registry to save configuration settings, but in the
world of .NET, I think that is generally a bad thing.

#2 is a nice solution in my opinion because if you need your program to
run under strict security, then it still can because it only has access
to a controlled portion of the user's harddrive. Also, if you're not big
on writing an XML Reader/Writer, you can cheat and use a DataSet to do
it for you.

Hopefully this will send you in the right direction.

Brian

-----Original Message-----
From: Andrew Cherry [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, April 16, 2002 3:52 PM
To: [EMAIL PROTECTED]
Subject: [DOTNET] Saving application settings...


I'm trying to use the
System.Configuration.ConfigurationSettings.AppSettings to retrieve saved
settings (duh :) ). That works fine. However, I've noticed that it's a
read only container -- meaning I can't save any settings that change.

Is there any way (short of writing my own settings system) that I would
be able to save as well as retrieve settings?

Thanks,
Andrew

You can read messages from the DOTNET archive, unsubscribe from DOTNET,
or subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the DOTNET archive, unsubscribe from DOTNET,
or subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the DOTNET archive, unsubscribe from DOTNET,
or subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to