Brendan Tompkins [MVP]

Sponsors

The Lounge

News

Advertisement

Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at imagehelp@codebetter.com
Managing Multiple .config Files

We're getting a lot of re-use out of our .NET framework here at the port.  We've got our public web site, Web Services, Windows Services, and now we're creating SharePoint Portal web parts - all using the same underlying managed framework.  I've run into a problem re-using .config files across applications.

Here's the problem.  We have a class VIT.Common.Configuration with a bunch of static methods that encapsulate access to in .config files. This works great, but it's starting to get hard to manage, because I need copies of the <AppSettings> blocks in each .config file.  I'm having to keep at least 5 of these in sync, and it's only going to get worse.   I'm going to explore creating a WebService to make this stuff available from one source, but I've got some security concerns here.  Has anyone out there any thoughts about this direction?    Are there better ways to manage multiple configurations?

-Brendan


Posted 12-03-2003 8:19 AM by Brendan Tompkins
Filed under:

[Advertisement]

Comments

Paul Wilson wrote re: Managing Multiple .config Files
on 12-03-2003 4:58 AM
What was that diagram created with?

As for your question, can you roll up the common items into machine.config?
Brendan Tompkins wrote re: Managing Multiple .config Files
on 12-03-2003 5:35 AM
You know, it's been so long since I used machine.config, that I forgot about it... But I remember having difficulties with it in general. In short, it was hard to manage across multiple versions of the .NET Framework. This might have been just a bug with my server, but I remember having some problems with two machine.config files in different locations. I also want to be able to deploy my configuration with my installers, and I'm not entirely comfortable having an installer messing around with machine.config.
andy maurer wrote re: Managing Multiple .config Files
on 12-03-2003 5:36 AM
That is an interesting diagram.

Perhaps pull your duplicate settings out of the config file and put them in a central file/db and then in the config file just have a location pointer to those settings.
Brendan Tompkins wrote re: Managing Multiple .config Files
on 12-03-2003 5:38 AM
To anwser your other question, I created that diagram with Visio 2003 and Visio UML (to reverse engineer my framework). I originally created it to print out a big poster, but Visio's new web export is pretty cool. You can even search for method names, and it'll point out the containing class!
X59939 wrote config Files
on 09-27-2005 6:32 AM
GATCATGATTACGGCCCGCGCTCAAGCGTTTTCGTCCCGTTGTTTGCCGTTGAGCAGGCTGCGACCACGA
CCGGAACCTGGATGCTGGCACGGATGTCCGGCGCATGTCTGGTGCCCTTCGTTCCACGCCGTAAGCCAGA
TGGCAAAGGGTATCAATTGATTATGCTGCCGCCAGAGTGTTCTCCGCCACTGGATGATGCCGAAACTACC
GCCGCGTGGATGAACAAAGTGGTCGAAAAATGCATCATGATGGCACCAGAGCAGTATATGTGGTTACACC
GTCGCTTTAAAACACGCCCGGAAGGCGTTCCTTCACGCTATTAAATCTCCCATGCCGGATGCTTCAGAAT
GGCATCCGGCATTACCACAGCAAATCCCCCTGATTTAGCGATAAAAGCTCTCTGGATTGCGCCCCCTGGA
AGTCGGGCGCATAATTAGTGTGCTTATCTTTTCTTCTTATGTTCACCGCGCCTGGCGCACCAACAGCGGA
TTGCTATGTCACCCTGTGAAAATGACACCCCTATAAACTGGAAACGAAACCTGATCGTCGCCTGGCTAGG
CTGTTTTCTTACCGGTGCCGCCTTCAGTCTGGTAATGCCCTTCTTACCCCTCTACGTTGAGCAGCTTGGC
GTTACCGGTCACTCCGCCCTGAATATGTGGTCCGGTATTGTCTTCAGCATTACATTTTTATTTTCGGCCA
TCGCCTCACCGTTTTGGGGTGGACTCGCCGACCGTAAAGGCCGAAAACTCATGCTATTACGCTCTGCCCT
CGGCATGGGCATCGTGATGGTGTTGATGGGGCTGGCACAAAATATCTGGCAGTTTTTGATCCTGCGGGCG
CTTCTTGGGTTACTTGGCGGATTTGTCCCCAACGCTAATGCTCTTATCGCCACACAAGTACCGCGTAATA
AAAGCGGCTGGGCGCTGGGTACGCTCTCCACAGGCGGCGTTAGTGGTGCGTTGCTCGGCCCAATGGCTGG
CGGCCTGCTCGCCGATAGCTACGGCTTACGTCCGGTATTCTTTATTACCGCCAGTGTGCTCATACTCTGC
TTTTTCGTCACCCTGTTTTGCATCAGAGAAAAATTCCAGCCGGTCAGCAAAAAAGAGATGCTGCACATGC
GGGAAGTGGTGACATCACTTAAAAACCCGAAACTGGTACTCAGCCTGTTTGTCACTACGTTAATCATCCA
GGTGGCGACGGGCTCAATTGCCCCCATTCTGACGCTGTATGTCCGCGAACTGGCGGGTAACGTCAGTAAC
GTCGCCTTTATCAGTGGCATGATCGCCTCGGTGCCAGGCGTGGCGGCTCTGCTAAGTGCACCACGACTCG
GCAAACTTGGCGATCGAATCGGACCCGAAAAGATCCTGATTACAGCGCTGATCTTTTCTGTACTGCTGTT
GATCCCAATGTCTTACGTTCAGACGCCATTGCAACTTGGGATTTTACGTTTTTTGCTCGGTGCCGCCGAT
GGTGCACTACTCCCCGCCGTACAGACACTGTTGGTTTACAACTCGAGCAACCAGATCGCCGGGCGTATCT
TCAGCTATAACCAATCGTTTCGTGATATTGGCAACGTTACCGGACCATTGATGGGAGCAGCGATTTCAGC
GAACTACGGTTTCAGAGCGGTATTTCTCGTCACCGCTGGCGTAGTGTTATTCAACGCAGTCTATTCATGG
AACAGTCTACGTCGTCGTCGAATACCCCAGGTATCGAACTGATTTTTCGCCTTTCATACTTGCAAAAGCG
GAGAATCAGCTATCCTTTTCCCTGAAACCTCATCAACTCAAAGGGAGAATCGTGATGACCATGTACGCAA
CGCTTGAAGAAGCCATTGACGCTGCACGCGAAGAATTTCTTGCAGACAACCCCGGCATCGACGCCGAAGA
TGCGAATGTGCAACAGTTCAATGCCCAAAAATACGTTTTGCAGGACGGCGACATCATGTGGCAAGTTGAG
TTTTTTGCCGACGAAGGGGAAGAAGGTGAATGTTTACCTATGCTTAGCGGTGAAGCCGCGCAAAGTGTTT
TTGATGGCGACTATGATGAGATAGAGATACGCCAGGAGTGGCAGGAAGAGAATACATTACATGAATGGGA
CGAGGGGGAATTTCAGCTTGAGCCACCGCTGGATACCGAGGAAGGACGCGCAGCAGCTGATGAGTGGGAT
GAACGTTAATCACTCATACGGGCCATGATGAATGTCGATCGGCAGCAGTAAAGTATCAAAAACCAGAGAG
AATGGCAGATCAAGGATCGTGACATAACGCCAGGCGGAGTCACGCACATCCCATTGCACACCGGGATAAT
ATTGGTTGCCATGCCCCTGCCCCGGTATAGTGCGACTAATAATGCTGCCACAGCCACTCAGCAAGGTCAC
CATGATGCTCACCACAATTAAACGCATTTGATACCTCTTTCGTAAAAAAATACCGGCATAACGCCGGTAT
TTTTATTGGCTCGTTGTTTTTGCCGGATGCGGCGTGAACGCCTTATCCGACCCACAAAGTCTTGCAAAAT
CAATAAATTGCAGGAACGATGTAGGCCTGATAAGCGTAGCGCATCAGGCAACTACGTTTTTATTGCGAAG
CCGCATCCGGTTTACGCAATGCCAGTGGATTGAGCTTTATCCCTTCGTAATAACTCACCCATGAAGAATA
TCTCTCCGGGGAATTC

Add a Comment

(required)  
(optional)
(required)  
Remember Me?