473,387 Members | 1,388 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

application configuration file

Hello all,
I was wondering if it's possible to write to an application config file at
runtime.
I wrote a bit of code to read the file and when I tried to write to it I got
an error, I've been looking through MSDN for any info, but all I get is how
to read the file and no specific statement saying it can't be written to.

Basically, I have the default path for some directories and dbs that the app
needs, and want to be able for the user to just select the new location and
save it back into the .config file, if anything changes on the filesystem.

Thanks In Advance,
Eric Dreksler
Nov 20 '05 #1
2 1065
* "Eric Dreksler" <ericd AT accessoneinc DOT com> scripsit:
Basically, I have the default path for some directories and dbs that the app
needs, and want to be able for the user to just select the new location and
save it back into the .config file, if anything changes on the filesystem.


The config file should not be used to store user preferences.

Configuration Management Application Block
<URL:http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/cmab.asp>

<URL:http://www.palmbytes.de/content/dotnetlibs/optionslib.htm>

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #2
Thanks for the links and the info.

Eric Dreksler

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:2f************@uni-berlin.de...
* "Eric Dreksler" <ericd AT accessoneinc DOT com> scripsit:
Basically, I have the default path for some directories and dbs that the app needs, and want to be able for the user to just select the new location and save it back into the .config file, if anything changes on the
filesystem.
The config file should not be used to store user preferences.

Configuration Management Application Block
<URL:http://msdn.microsoft.com/library/de...y/en-us/dnbda/
html/cmab.asp>
<URL:http://www.palmbytes.de/content/dotnetlibs/optionslib.htm>

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Terence Shek | last post by:
Is there a way to set the application binding policy so that it always binds to the latest version of an assembly? I'm hoping there is a way to avoid updating the application's binding...
2
by: kathy | last post by:
What Application Configuration File is? And when/where/how to use it? Any documents on that? MSDN has somrthings scatter everywhere - hard to follow. thanks,
6
by: Javier Cortés Cortés | last post by:
i am getting this error when i am trying to access any file(with the ext. aspx) from my remote server. the error is : Server Error in '/' Application....
3
by: Damian | last post by:
Hi everyone I'm having an issue with one of our applications. I'm getting the following error when attempting to log in to the site: Server Error in 'xxxxxxxxxxxxxxxx' Application....
4
by: tommy | last post by:
hello everbody, i write a little asp-application with forms-authentication. i copy my aspx-files with web.config to my webspace and i get the error above... i tried to set the...
9
by: Wayne Wengert | last post by:
I built an ASP application and it runs fine on my local IIS. I am trying to move the application to my web service (ISP) out on the internet. I've read several of the help articles but they all...
0
by: George Durzi | last post by:
I'm trying to extend the ExceptionManager Application Block and build a custom publisher that writes my exceptions to the database. That's easy part. The difficulty I am having is in configuring my...
3
by: Sean | last post by:
HI There, I am having trouble deploying my .aspx pages to a remote server, I have made changes to the config file and it still returns an error. I have also contacted the server administrator to...
12
by: Kevin Farless | last post by:
Hi all, I'm having trouble viewing any .aspx pages on my hosting company's server. The server is a new box running Windows Server 2003 default installation. I'm the first client to try using...
5
by: rdcpro | last post by:
In reading MSDN docs on creating custom Configuration sections, I found this page: ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.