1

I have few settings which I could place in a separate XML file and have them accessed in the Web app. Then I thought (thinking of one additional file to deploy), why not have them in the web.config itself. However, just because I need to have custom nodes, I can not have the settings under . So, I am thinking of creating a custom config handler following this. Would that be better than having a separate XML file? Is It going to be an overkill or performance wise? Is there a better way to go?

1 Answer 1

4

From performance standpoint putting custom settings in web.config and creating a configuration handler will be OK because the config values are cached and read only once when the application starts. Putting the values in a separate XML file you will need to handle the caching your self if you want to avoid parsing it every time you need to access those values.

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

3 Comments

One more benefit of keeping everything in web.config is that future developers will probably be more comfertable with it, since its likely a system they will have previous experience with.
Darin, what would be the difference If the application is a Windows service and If I have those settings in the App.config or the custom config handler? For me, the additional file problem remains.
The configuration system works the same no matter the type of application.

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.