Keep settings in sync between forms application and windows service (or any n-tier, really)

前端 未结 4 711
太阳男子
太阳男子 2021-01-03 04:25

I have a Windows Service that performs a number of periodic activities, and I want to change the settings of this service from a Windows Forms app. I\'m not sure, though, ab

4条回答
  •  时光说笑
    2021-01-03 05:04

    I have to agree with your initial lean toward #2 and #3. I particularly like the #3 since I'm not a fan of polling but ultimately I think the decision between #2 or #3 will be driven by the requirements of your service.

    As for storage of user settings I would recommend exploring Isolated Storage ( http://msdn.microsoft.com/en-us/library/3ak841sy.aspx ). It provides an excellent mechanism for secure, consistent, and reliable access to user files. You won't have to worry about user's having permission unless the Administrator has completely turned off Isolated Storage. Plus if you enable roaming, users can even take their settings with them if they utilize different systems on the same domain, pretty slick eh?

提交回复
热议问题