2

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..

2
  • +1. We have URL rewriting all in one massive file (rewriter.config). Would also like to know if it can be split up. Commented Sep 15, 2010 at 22:21
  • 1
    on one hand though, it kind of makes sense to have it in one file - because URL rewriting is application-wide. splitting it up and changing one of the files, it affects the routes on other files. so unless you're careful it could have undesired effects. Commented Sep 16, 2010 at 2:19

1 Answer 1

4

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.

Sign up to request clarification or add additional context in comments.

1 Comment

Well it seems a good answer. How do you automate that? Can you append a sample code or something to your answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.