views:

52

answers:

1

I need to know whether there is another way to include external files in web.config apart from configSource="Source".

The reason why I am asking is, I am working with UrlRewriter.net module.

<section name="rewriter" requirePermission="false" type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler, Intelligencia.UrlRewriter" />

So I did this to seperate the file from web.config for a clean view and edit.

<rewriter configSource="rewriter.xml" />

So I have a external file where I store rewriter rules.

But I also want to break rewriter.xml into separate files.I tried include but it says it was not allowed.

Thanks..

+4  A: 

If you are splitting the files for maintainability, you might just want to use a post-build process to merge them when you run the application.

Nicholas Cloud
+1 a good (and somewhat obvious) idea.
RPM1984
Well it seems a good answer. How do you automate that? Can you append a sample code or something to your answer.
Braveyard