1.

Differentiate between Machine.Config Vs Web.Config vs Global.asax?

Answer»
  • config:
    • This is automatically INSTALLED when you install Visual Studio. Net.
    • This is ALSO called a machine level configuration file.
    • Only one Machine.config file exists on a server.
    • This file is at the highest level in the configuration hierarchy.The settings of Machine.config file are APPLIED to the whole asp.net application.
  • config:
    • This is automatically created when you create an ASP.Net web application project.
    • This is also called the application-level configuration file.
    • This file inherits the setting from the Machine.config.
    • Web. Config is used for asp.net web projects/web services.
    • The settings made in the Web.config file are applied to that particular web application only.
  • asax:
    • Used to handle application and session-level events and objects for an ASP.NET web site running on an IIS Web Server.
    • Code to handle application events (such as the start and end of an application) resides in Global.asax.
    • Such event code cannot reside in the ASP.NET page or web service code itself, since during the start or end of the application, its code has not yet been loaded (or unloaded).
    • It is also used to declare data that is AVAILABLE across different application REQUESTS or across different browser sessions. This process is known as application and session state management


Discussion

No Comment Found