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
2009-04-23 15:41:16
When I did that before the app complained. I can try it and see what it complains about.
Will Rickards
2009-04-23 15:45:47
Maybe you can try trimming the inner web.config to only include the set of attributes you need in your subfolder.
pgb
2009-04-23 15:50:25
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
2009-04-23 15:43:33
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
2009-04-23 15:52:07