Web.Config File

    The main benefits of having a config file in any web project is that it is a single file which contain

  • Database connections
  • Caching Settings
  • Session states
  • Error Handling
  • Security   
 and if you want to change any configuration setting than you just need to change at a single place and need not to deploy the project again  and if you put all those code in different files like you are giving connection string in each file where you need and than you need a  change in the string than you need to change the code in all the  file at every place which will be a tedious task and Moreover  you  need to rebuild the solution and deploy it again.      

Comments

  1. my project do not have any config file so how to deal with it??

    ReplyDelete
    Replies
    1. depends on requirements still u can make a file giving it name as app.config and add the requisite tag in it

      Delete

Post a Comment

Popular posts from this blog

Npgsql query and format with output parameters

Npgsql Helper class