Oliver
Oliver

Reputation: 11597

Storing configuration information for a solution

I have a bunch of console applications that trigger each other or are called by a scheduler, a website that serves as a front end to these, and a database which all of the applications have access to.

All of the applications have their own app.config / web.config files. However, there is some information (to do with server locations, error reporting controls and so on) that all these applications need to know about.

Where is the best place to store this configuration information? My first idea was to store it in the SQL server in a Configuration table, but this isn't that appealing.

where should I store configuration information that all projects/applications in a solution have access to?

Upvotes: 2

Views: 64

Answers (1)

wal
wal

Reputation: 17729

I would store this in the same place as your shared AssemblyInfo.cs or your strong name key file (.snk)- that is assuming you share those files across your projects.

So your root folder of your solution would look like:

Project1Dir
Project2Dir
AssemblyInfo.cs
MySolution.sln
key.snk
shared.config

and you would use 'Add as Link' for each of your projects that require shared.config

Upvotes: 2

Related Questions