.Net Framework provides three types of files known as Configuration Files which contains information for controlling and managing .Net Applications i.e.Windows(Windows Forms and WPF) and Web Applications(Asp.Net,MVC). These are Machine.Config, App.Config and Web.Config.
These files are XML based configuration files.All the information is in the format of XML which can be easily modified and readable by .Net Applications.
Machine.Config:
- This file is the top in the hierarchy of configuration files.
- It is a global settings file for all the applications that run on the .Net Framework on the machine.
- All the .Net application will use this configuration information in their applications.
- This file is automatically installed whenever .Net Framework is installed in the System.Only one file per the system. This file is located at C:\Windows\Microsoft.NET\Framework\v2.0.50727\CONFIG.
- All the information in this file is readable by the applications but can not be modified. This file can be maintained by the system administrator.
- Only one machine configuration file is exists on server.
- This file stores configuration information at system level so it can be called as machine level configuration file.
Web.Config:
- This file is automatically created when you create Asp.Net Web Application Project.
- This file contains configuration information only for one web application only.
- All the machine.config file settings can be inherited here and also can be overidable.
- This file contains application level configuration so it can be called as application level configuration file.
- One web application can contain many web.config files based on the number of folders in the application.
- You can find what Asp.Net Server Configuration can be stored here at Asp.Net Settings Schema at MSDN
- You can store information like connections strings, domains, application properties,session information, Cookie information,Viewstate information etc in web.config file.
0 comments:
Post a Comment
Note: only a member of this blog may post a comment.