Hi, we are developing a MVC app using CSLA.net. We deploy seperate layers to seperate servers(web server and app server). If BLL uses some key/value setting in web.config, which web.config should we put the key/value setting? Since there are 2 web.config files, one is on web server and another is on application server.
You need to put those key/values where they are used. Could be both or just one of them - depending on how your code read these values.
I this is used by business logic only and BLL runs on the application server then that´s the proper place.
Thanks. Actually we put BLL on both web server and application server, so on which web.config should we put the settings if they are used by BLL? Both?
Yes, probably both web.config files.
Alternatively you can store them all on the app server and just have a read-only business object to expose the values, fetching this object up-front as part of your startup process - then you'd only have the settings in one location if that's really important to you.
Otherwise yup wherever you need the settings, supply em.
Copyright (c) Marimer LLC