How to best distribute client specific configuration settings

I’m writing a WinForms desktop application which will be shipped out to several different clients and am wondering what the best way to implement a user configuration file is. Normally I would use the built in Settings.settings or app.config to store user settings but in this case what I want to store is unique for every client, I want it to be configured before sending it out and I want to avoid recompiling every time we ship to a new client.

What I want my config file to do is to store some information about the client specific graphics used in the program and some (hashed) passwords.

We don’t suspect that the users would be hacking into anything in the program; we’re just trying to avoid regular ‘tech’ level users from making changes or accessing certain modules that a manager should change. Up until now the password has been hardcoded and over a few years of use everyone has gotten to know what it is. We’d like to be in more control of what passwords go where but not necessarily give the clients control of the password changes.

I wrote a separate program that (de)serializes a configuration class to an XML file that would be put in the appropriate directory upon installation so that all people need to do (after I’m out of the picture) is have the .msi of the program, create an xml config file using this separate program, include the graphics they want in a sub folder and zip it all up. Then when the user unzips and installs, everything is put in the right place. When my program loads it looks for my config file to finish loading. If it can’t find it it gives the user a change to locate it otherwise the program doesn’t open.

I’ve been reading about the ConfigurationManager class but can’t figure out how I could best use it. I haven’t found much on people using outside configuration files and am not sure if my situation truly is unique or I’m not thinking inside the box enough. Is this a good design? Should I be doing this differently? If you have had a similar situation how have you solved it?

We had a similar situation where I work and used pretty much your solution. We pushed any client specific configuration into external json configuration files and load them in on program start. What we did do was to make sure that an installer would install a working default set in case the configuration files hadn’t been installed on the system yet.

I’m not sure if the ConfigurationManager class would give you any benefit either as in my experience it pretty much just gives you a nice was of serializing a configuration file. Json/Xml/Whatever serialization is fairly well known and easy these days that it really comes down to personal choice.

The only addition that I’ve thought of is to store the configuration files on a webserver and retrieve them during install or first boot. You could specify the address during install or again on first boot. That way you don’t have to supply as many files with the installer and gives you a central way to administer change to the configuration in the future.

1

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật