Groups | Blog | Home
all groups > dotnet performance > march 2005 >

dotnet performance : Reading web config files


sahridhayan
3/30/2005 1:15:03 AM
We have an application develped in asp.net whcih supports multiple database
the database type is stored in web.config file..

But my BL layer componenet only need to know dbtype.. so what are the best
ways
of storing the db type and reading it..

1. web.config.
2. Remoting config
3. or any xml file
4. remoting singleton component property contains dbtype value.. (once read
from xml file .. and having the value for all along???)

any direction would be helpful..

i don't want to read the IO file for knowing the settings for every Remoting
call...

regards
rajaraman






Brock Allen
3/30/2005 7:11:35 AM
Go ahead and put it in web.config. Once read the settings data is cached.
You can even build your own sections in web.config, and using XmlSerializer
it's fairly simple. Here's a sample:

http://staff.develop.com/ballen/samples/ConfigSample.zip

-Brock
DevelopMentor
http://staff.develop.com/ballen



[quoted text, click to view]


Anubhav Mishra
4/2/2005 10:28:19 PM
Brock is right go for web.config

Thanks
Anubhav

[quoted text, click to view]

AddThis Social Bookmark Button