473,508 Members | 2,303 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

application config file

Hi, all!

I have a question regarding application config files.

Is there a possibility that a value from the application config file can be
altered within the application itself?

If so, how is is possible?

thanks! :)
Nov 16 '05 #1
6 3720
Hi Ann,

There is no such support.
However, you might editi it like any other xml file.
2nd however, since the config file is normally placed under "program files"
folder which is very much protected against writting (only admin should have
write access) it might be impossible for a non-admin to alter the config
file.
--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

"Ann Marinas" <ma*******@hotmail.com> wrote in message
news:OL**************@TK2MSFTNGP12.phx.gbl...
Hi, all!

I have a question regarding application config files.

Is there a possibility that a value from the application config file can be altered within the application itself?

If so, how is is possible?

thanks! :)

Nov 16 '05 #2
Thanks Miha for answering my question.

I really do appreciate it! :)

Ann
"Miha Markic [MVP C#]" <miha at rthand com> wrote in message
news:ef**************@TK2MSFTNGP09.phx.gbl...
Hi Ann,

There is no such support.
However, you might editi it like any other xml file.
2nd however, since the config file is normally placed under "program files" folder which is very much protected against writting (only admin should have write access) it might be impossible for a non-admin to alter the config
file.
--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

"Ann Marinas" <ma*******@hotmail.com> wrote in message
news:OL**************@TK2MSFTNGP12.phx.gbl...
Hi, all!

I have a question regarding application config files.

Is there a possibility that a value from the application config file can

be
altered within the application itself?

If so, how is is possible?

thanks! :)


Nov 16 '05 #3
Hi Ann,

No, you can't you have two options:

1- create your own config file , either XML or text and store there your
values, another way of doing it is using a Hashtable or NameValueCollection
and serialize it.

2- Keep the values in the registry

Hope this help,

Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Ann Marinas" <ma*******@hotmail.com> wrote in message
news:OL**************@TK2MSFTNGP12.phx.gbl...
Hi, all!

I have a question regarding application config files.

Is there a possibility that a value from the application config file can be altered within the application itself?

If so, how is is possible?

thanks! :)

Nov 16 '05 #4
Hi Ann,

In addition to what Miha had replied with, I found this thread that might be
of some assistance. I'm not sure if this is exactly what you want to do, but
it might be helpful.

http://www.dotnet247.com/247referenc...49/245285.aspx

What I usually do is create a ConfigSection and then deserialize it to a
class that implements System.Configuration.IConfigurationSectionHandler.
Then, when I want to update values to it, I update the class values.
Finally, I have the AppDomain.CurrentDomain.ProcessExit (you could also use
the Application.Exit or Application.ThreadExit events) wired up so that when
the application is about to exit, I serialize the running values in my class
back to the configuration file. It's not elegant, but it works and allows
for app options to be changed without the user having to restart the
application.

--
HTH

Kyril Magnos
"I'm not a developer anymore, I'm a software engineer now!" :-)

"Ann Marinas" <ma*******@hotmail.com> wrote in message
news:OL**************@TK2MSFTNGP12.phx.gbl...
| Hi, all!
|
| I have a question regarding application config files.
|
| Is there a possibility that a value from the application config file can
be
| altered within the application itself?
|
| If so, how is is possible?
|
| thanks! :)
|
|
Nov 16 '05 #5
Have a look at
http://www.west-wind.com/presentatio...ationclass.asp

--

HTH

Éric Moreau, MCSD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Concept S2i inc.(www.s2i.com)
"Ann Marinas" <ma*******@hotmail.com> wrote in message
news:OL**************@TK2MSFTNGP12.phx.gbl...
Hi, all!

I have a question regarding application config files.

Is there a possibility that a value from the application config file can be altered within the application itself?

If so, how is is possible?

thanks! :)

Nov 16 '05 #6
Thank you all for your answers. I really do appreciate the help!

Ann
"Ann Marinas" <ma*******@hotmail.com> wrote in message
news:OL**************@TK2MSFTNGP12.phx.gbl...
Hi, all!

I have a question regarding application config files.

Is there a possibility that a value from the application config file can be altered within the application itself?

If so, how is is possible?

thanks! :)

Nov 16 '05 #7

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

Similar topics

2
3432
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,
4
7859
by: grs | last post by:
Can a class library have a app.config file. Reason for asking is that the microsoft application blocks all read from myApp.exe.config. How can you use the application blocks if you do not have an...
6
635
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
4884
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....
5
2262
by: rdcpro | last post by:
In reading MSDN docs on creating custom Configuration sections, I found this page: ...
7
1304
by: Edward Yang | last post by:
In my test, I have two web applications app1 and app2, and I configure them as follows in IIS: $/comboapps |--web.config |--bin | app1.dll | app2.dll |--app1 | form1.aspx
6
1437
by: yaron | last post by:
Hi all, I want to give a sample console application for the user with 2 configuration files. I want to give also a 2 .bat files for running the sample application, one for each configuration...
5
2272
by: Sridhar | last post by:
Hi, I have created a project which contains classes to read the data from the database. This project has an App.Config file which contains the SqlConnection String. when this code is called from...
0
5228
by: Tifer | last post by:
Hello, I am building my first .Net Application. The first couple of Publish and Installs I did went fine. But after a couple of builds, I get a modal dialogue box error every time upon trying...
4
1751
by: Author | last post by:
This is regarding VS2005-generated files. I've searched a little and found out that *.vshost.* files are VS2005 generated for debugging purpose and should not be published to the end user. ...
0
7225
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
7123
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...
0
7382
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...
1
7042
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7495
tracyyun
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...
0
5627
agi2029
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,...
1
5052
isladogs
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...
0
3193
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...
0
1556
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 ...

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.