multiple configuration files
-
hi all how can i use multiple configuration file that is one web config file and some other files with .config extention and also how to refer the keys thanx in advance coolsweety
-
hi all how can i use multiple configuration file that is one web config file and some other files with .config extention and also how to refer the keys thanx in advance coolsweety
Does this article help? http://www.codeproject.com/dotnet/appsettings_fileattribute.asp[^]
-
hi all how can i use multiple configuration file that is one web config file and some other files with .config extention and also how to refer the keys thanx in advance coolsweety
I also think the new ASP.NET 2.0 attribute
configSource
may be useful to you - look at the MSDN documentation: General Attributes Inherited by Section Elements[^] and see if it helps. -
I also think the new ASP.NET 2.0 attribute
configSource
may be useful to you - look at the MSDN documentation: General Attributes Inherited by Section Elements[^] and see if it helps.hello sir, thanx, i used the same code from code project. if i gave the file name directly, then am getting one exception. and if i gave file name in with relative path it wont give any exception but didnt get any value. the code is shown below. settings.config appSettings add key="Setting1" value="This is Setting 1 from ettings.config" add key="Setting2" value="This is Setting 2 from settings.config" add key="ConnectionString" value="ConnectString from settings.confg" appSettings and web.config is appSettings file="//Settings.config" appSettings and in cs file string ConfigAttributeValue = ConfigurationManager.AppSettings["ConnectionString"]; Response.Write(ConfigAttributeValue); exception i ma getting is The root element must match the name of the section referencing the file, 'appSettings' (c:\inetpub\wwwroot\referexternalfiles\secondtestfileext\Settings.config am using framework2 and vs2005 can u help me to get rid off this problem coolsweety -- modified at 0:37 Tuesday 25th April, 2006
-
I also think the new ASP.NET 2.0 attribute
configSource
may be useful to you - look at the MSDN documentation: General Attributes Inherited by Section Elements[^] and see if it helps.thanx all, it is working. the mistake wat i made is i had created the second config file with all attributes in configurationsettings, no need of using all setting use only appsettings in second config file coolsweety