Friday 18 November 2011

What is AppSetting Section in “Web.Config” file in asp.net

Web.config file defines configuration for a web project. Using "AppSetting" section, we can
define user-defined values like "Connection String,Max Connection","Db Name"

etc. 
 
 Example:-

<appSettings>
   <add key="connection1" value="server=tdsw008;database=ERM; uid=sa;pwd=pspl@123456789;"/>
   <add key="connectionSAP" value="server=90.10.0.23;database=ACDB_PROD;uid=sa;pwd=sap$2010acct"/>
   <add key="ServerName" value="tdsw017"/>
</appSettings>

which will be used through out the project for database connection or for any other purpose.




No comments:

Post a Comment