I've recently installed Beta 2 ov Visual Studio and an updating a few
small applications as a way to get my feet wet with some of the new
functionality. There are many new features which are really going to
make coding a lot simpler.
One area I'm investigating is the new "My.Setting s" object. Managing
these is so very easy now, except for one problem. In nearly all of
my applications, I use a class I wrote for reading/writing settings.
This class will build the MyApp.exe.confi g file if it's missing and
will add setting entries with default values if they're missing. The
'system' settings and the 'user' settings are in one file (or two, if
I choose). This way it's very easy for someone to copy the config
file(s) with the .exe and have the same user settings on multiple
machines.
Is there a way to specify where the user config settings are stored,
assuming you have the right permissions to read/write the file
location, of course?
Thanks!
-Jason Kendall Ja**********@ho tmail.com 3 2097
Short of writing your own settings provider, no, you can't specify the path
to the location of the user.config file.
Raghavendra explains why in his blog in his Client Settings FAQ http://blogs.msdn.com/rprabhu/articles/433979.aspx
Just out of curiosity, why do you want to change the path?
Best regards,
Johan Stenberg (MSFT Visual Basic)
"Jason Kendall" wrote: I've recently installed Beta 2 ov Visual Studio and an updating a few small applications as a way to get my feet wet with some of the new functionality. There are many new features which are really going to make coding a lot simpler.
One area I'm investigating is the new "My.Setting s" object. Managing these is so very easy now, except for one problem. In nearly all of my applications, I use a class I wrote for reading/writing settings. This class will build the MyApp.exe.confi g file if it's missing and will add setting entries with default values if they're missing. The 'system' settings and the 'user' settings are in one file (or two, if I choose). This way it's very easy for someone to copy the config file(s) with the .exe and have the same user settings on multiple machines.
Is there a way to specify where the user config settings are stored, assuming you have the right permissions to read/write the file location, of course?
Thanks!
-Jason Kendall Ja**********@ho tmail.com
Thanks for your reply!
"Just out of curiosity, why do you want to change the path?"
Really, the only reason is so that the user can copy all of their
settings, along with the executable, to a removable storage device and
put it on another machine. The default location for user
configuration settings is cryptic enough for some users that they'd
never find it. :-)
I'll probably write my own settings provider and use it in these rare
instances.
Thanks so much!
-Jason Kendall Ja**********@ho tmail.com
On Sun, 3 Jul 2005 10:08:01 -0700, Stenis
<St****@discuss ions.microsoft. com> wrote: Short of writing your own settings provider, no, you can't specify the path to the location of the user.config file.
Raghavendra explains why in his blog in his Client Settings FAQ
http://blogs.msdn.com/rprabhu/articles/433979.aspx
Just out of curiosity, why do you want to change the path?
Best regards, Johan Stenberg (MSFT Visual Basic)
"Jason Kendall" wrote:
I've recently installed Beta 2 ov Visual Studio and an updating a few small applications as a way to get my feet wet with some of the new functionality. There are many new features which are really going to make coding a lot simpler.
One area I'm investigating is the new "My.Setting s" object. Managing these is so very easy now, except for one problem. In nearly all of my applications, I use a class I wrote for reading/writing settings. This class will build the MyApp.exe.confi g file if it's missing and will add setting entries with default values if they're missing. The 'system' settings and the 'user' settings are in one file (or two, if I choose). This way it's very easy for someone to copy the config file(s) with the .exe and have the same user settings on multiple machines.
Is there a way to specify where the user config settings are stored, assuming you have the right permissions to read/write the file location, of course?
Thanks!
-Jason Kendall Ja**********@ho tmail.com
Have you considered adding an import/export settings function in your program
instead? I would *not* recommend having your application write in the program
files folder - if you are running under a "normal" non admin account, this
will most likely fail, since you don't have write access there.
Best regards,
Johan Stenberg
"Jason Kendall" wrote: Thanks for your reply!
"Just out of curiosity, why do you want to change the path?" Really, the only reason is so that the user can copy all of their settings, along with the executable, to a removable storage device and put it on another machine. The default location for user configuration settings is cryptic enough for some users that they'd never find it. :-)
I'll probably write my own settings provider and use it in these rare instances.
Thanks so much!
-Jason Kendall Ja**********@ho tmail.com
On Sun, 3 Jul 2005 10:08:01 -0700, Stenis <St****@discuss ions.microsoft. com> wrote:
Short of writing your own settings provider, no, you can't specify the path to the location of the user.config file.
Raghavendra explains why in his blog in his Client Settings FAQ
http://blogs.msdn.com/rprabhu/articles/433979.aspx
Just out of curiosity, why do you want to change the path?
Best regards, Johan Stenberg (MSFT Visual Basic)
"Jason Kendall" wrote:
I've recently installed Beta 2 ov Visual Studio and an updating a few small applications as a way to get my feet wet with some of the new functionality. There are many new features which are really going to make coding a lot simpler.
One area I'm investigating is the new "My.Setting s" object. Managing these is so very easy now, except for one problem. In nearly all of my applications, I use a class I wrote for reading/writing settings. This class will build the MyApp.exe.confi g file if it's missing and will add setting entries with default values if they're missing. The 'system' settings and the 'user' settings are in one file (or two, if I choose). This way it's very easy for someone to copy the config file(s) with the .exe and have the same user settings on multiple machines.
Is there a way to specify where the user config settings are stored, assuming you have the right permissions to read/write the file location, of course?
Thanks!
-Jason Kendall Ja**********@ho tmail.com
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: GS |
last post by:
Hi,
There is reference about accessing settings file in VB.NET but nothing about
C#. How do I read settings in application settings file with C#?
Thanks,
G
|
by: GS |
last post by:
How do I use My.Settings equivalent in C#? Below is part of MSDN documentation about accessing settings file. I wrote C# console application using VS 2005 and .NET 2.0 and would like to use new settings file in 2.0 and can not find any documentation about using c#, there is some for VB.NET.
This section contains topics describing...
|
by: Paul Cheetham |
last post by:
Hi,
I am developing an application that needs to store some machine-specific
settings. The application is going to be published on the network in
order to keep the clients on the latest version.
Because of this, I am unable to store these settings in the App.Config
file, as this gets updated every time the application does, and there...
|
by: Chris Dunaway |
last post by:
I have an .exe console project and a class library project as part of a
solution. The .exe has an App.config file and I have used the Settings
page to add some Application level settings.
When I try to retrieve a setting using this code:
//Method 1
string s = ConfigurationManager.AppSettings;
|
by: MacKris |
last post by:
Hi, I'm a chemist trying to use the python script GaussSum.py with gnuplot for creating dataplots, and need some help. Whenever I try to produce a plot from the GaussSum GUI I get the error
sh: line 1: /Users/kristine/Desktop/GaussSum-1.0.5/gnuplot400/bin/wgnuplot.exe: No such file or directory
in my terminal. At the moment, I have gnuplot...
| |
by: Jon Slaughter |
last post by:
I wrote an app that needed to save settings such as colors, fonts, etc...
after hours of trying to use ConfigurationManager and AppSettings along with
a few other things I finally found that I could just use
global::Properties.xxx.Settings.Default.yyy
where xxx is the namespace and yyy is a setting created in the settings
dialog.
This is...
|
by: Andy |
last post by:
I need to write a VB.NET WinForms app. For this purpose I need to keep some
settings of the application, like many other Windows applications do.
The most obvious solution is to store settings in the XML file or registry.
If it's an XML file, then I need the following:
1. Create XSD schema, and be able to validate XML file with the...
|
by: =?Utf-8?B?UmljayBHbG9z?= |
last post by:
For some unknown reason (user error?), I cannot get a NameValueCollection to
persist in the app.config file.
Unlike other settings, I cannot get the String Collection Editor GUI to
allow my to add/edit any values for a setting with type NameValueCollection.
Nor can I get a NameValueCollection to persist to the User Settings via code
using...
|
by: WT |
last post by:
Hello,
Using VS2005.
I have an assembly library that can be called from a Web site asp.net
application or from a winform application.
From this library I need to retrieve a path using simply a key like
'libPath'.
As far as winform and asp.net share the same common base class for settings,
SettingsBase, how to manage this ?
For winform...
|
by: Rainer Queck |
last post by:
Hello NG,
Is it possible to share the settings of an application with a class
libreary?
In my case I have a application and a set of different reports (home made)
put into a class library.
The plan is to delivere different report.dlls with the main app.
But it is essentially importent, that the reports and the app use the same
settings.
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |