0

Is there a way to use a generated file as a configSource for a web.config section?

In web.config, I tried a simple:

<webParts configSource="webpartsConfig.aspx" />

where webpartsConfig.aspx just spits out XML when accessed normally, but not as a configSource. (The literal source code is included as-is, giving an error.) Any solutions or alternatives?

Motivation for this solution: I have different configuration variables locally and online, and I don't want to juggle multiple config files.

Çağdaş Tekin
  • 16,592
  • 4
  • 49
  • 58
Protector one
  • 6,926
  • 5
  • 62
  • 86

1 Answers1

0

Hopefully this doesn't come too late to help, but I would suggest looking at an adaption of the source used in Enterprise Library. Details - http://blogs.msdn.com/tomholl/archive/2006/04/02/entlib2externalconfig.aspx

Then you would be creating a custom ConfigurationSource that reads HttpWebResponses.

Reddog
  • 15,219
  • 3
  • 51
  • 63