Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Service Fabric - Difference between using app.config and settings.xml?

I've been able to use either Settings.xml and App.config in an Azure service fabric to retrieve parameters like connectionstrings. What are the differences between the two and how should I use them?

like image 819
David Jiménez Martínez Avatar asked Apr 13 '16 14:04

David Jiménez Martínez


1 Answers

The benefits are related to upgrading the application when you want to make changes to your config settings:

  1. Settings.xml is part of the Config package which is an independently updateable component in the application. If you're using Settings.xml and you want to update its content, you can deploy just the Config package that contains it. If you relied on App.config, you'd have to deploy the entire Code package which could be very large depending on the application.
  2. When only updating a Config package, the upgrade does not cause the running service process to be restarted. Instead, it triggers a callback which your service code can respond to. If you're using App.config, you'd need to update the Code package and that would cause your service process to be restarted in the cluster.
like image 172
Matt Thalman Avatar answered Nov 10 '22 00:11

Matt Thalman