467,858 Members | 1,670 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,858 developers. It's quick & easy.

How to change application scoped settings programmatically

Hello all,

I have this problem.
I have a windows service and I would like to put there Settings for starting
this service. Because of this service is running under NETWORK_SERVICE
account, what is the best way to use settings? Should I create my own
settings or can I use classic application settings. Is there way to change
this application-scoped settings change programmatically?

Thanks.
Apr 27 '06 #1
  • viewed: 4703
Share:
3 Replies
Hi Mirek,
Should I create my own settings or can I use classic application
settings. Is there way to change this application-scoped settings
change programmatically?


Unlike the user-scoped settings, the framework doesn't provide a method to
change application-scoped settings in the run-time, and the
application-scoped settings are read-only in most cases. So I suggest you
can create your own settings in a plain xml file and put it in the same
directory (or a well-known path) with your service's image, then manipulate
that xml file in your service's application to read and edit those settings.

Thanks for your understanding.

Best regards,

Gary Chang
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Apr 28 '06 #2
Thanks, I thought so,
thanks for confirmation. Now, is my soul a little bit calmed. :)

Mirek :))
""Gary Chang[MSFT]"" <v-******@online.microsoft.com> wrote in message
news:wg*************@TK2MSFTNGXA01.phx.gbl...
Hi Mirek,
Should I create my own settings or can I use classic application
settings. Is there way to change this application-scoped settings
change programmatically?


Unlike the user-scoped settings, the framework doesn't provide a method to
change application-scoped settings in the run-time, and the
application-scoped settings are read-only in most cases. So I suggest you
can create your own settings in a plain xml file and put it in the same
directory (or a well-known path) with your service's image, then
manipulate
that xml file in your service's application to read and edit those
settings.

Thanks for your understanding.

Best regards,

Gary Chang
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.

May 10 '06 #3
You are welcome, Mirek.:)

Good Luck!

Best regards,

Gary Chang
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

May 10 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by Dave Booker | last post: by
3 posts views Thread by John | last post: by
2 posts views Thread by Chris Dunaway | last post: by
reply views Thread by jack112 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.