tags:

views:

133

answers:

3

I have an ASP.net application. It resides within another asp.net application. I put my dll in the other apps bin folder and have a subdirectory with my aspx files. I can't edit the main app's web.config. So where can I store configuration settings? For example, this is an app that will get deployed to various clients. I want to store the client name used for display in the headers and such. And the location of a logo file.

+2  A: 

You can put a web.config file on the folder your ASPX files reside and .NET will take care of nesting them and aggregate its contents.

pgb
When I did that before the app complained. I can try it and see what it complains about.
Will Rickards
Maybe you can try trimming the inner web.config to only include the set of attributes you need in your subfolder.
pgb
A: 

You can use Settings.Settings to store it. This example might help. You can have multiple settings file and access any of them, just as you would any other class.

Ronnie
A: 

You can also just create a Settings.config XML file and put it wherever you want (the .config extension will prevent it from being viewable through an HTTP request), then wrap it with a Settings class and talk to that Settings class from your application.

Carson McComas