Monday, March 13, 2017

What is Web.Config File?

Web.config is a configuration file which contains application's settings/configurations. For a single application only one web.config file is used but if we have to set some configuration for a specific directory then we can make different config file for that directory. For a separate web.config file we have to create same file and we can put some redirection rules for that directory or we can set compression, etc. basically web.config file is xml based which have different tags for particular part of application. we can store database info which includes connections, Set the session expiry time, enable compression for whole application, put Error Handling rules and Security etc. below given some tag of web.config file.

<configuration>
  <configSections>
  </configSections>

  <appSettings>
  </appSettings>

  <connectionStrings>
    <add key="ConnectionName" value="remoteserver=127.1.1.1;uid=sa;pwd=****;database=TestDb" />
  </connectionStrings>

</configuration >

No comments:

Post a Comment