Interview Tips Interview Tips, Interview Questions and Answers

9Jul/100

Describe the basic schema of a .config file.

Configuration File Schema for the .NET Framework

Configuration Files are standard XML files.

The elements that implement configuration settings are:
<configuration> Element is the top-level element for all configuration files.
<assemblyBinding> Element specifies assembly binding policy at the configuration level.
<linkedConfiguration> Element specifies a configuration file to include.

The configuration schema is for the machine configuration file, application configuration files, and the security configuration file. The following schemas describe their element purposes:

  • Startup Settings Schema – specification of version of the CLR to be used.
  • Runtime Settings Schema – configuration of assembly binding and runtime behavior.
  • Network Settings Schema – specification of .NET connection to the Internet. \
  • Cryptography Settings Schema - mapping friendly algorithm names to classes that implement cryptography algorithms.
  • Configuration Sections Schema - creation and use of configuration sections for custom settings.
  • Trace and Debug Settings Schema – specification of trace switches and listeners.
  • Compiler and Language Provider Settings Schema – specification of compiler configuration for available language providers.
  • Application Settings Schema – enabling Windows Forms or ASP.NET applications to store and retrieve application-scoped and user-scoped settings.
2Mar/100

What is different b/w webconfig.xml & Machineconfig.xml

Web.config & machine.config both are configuration files.Web.config contains settings specific to an application where as machine.config contains settings to a computer. The Configuration system first searches settings in machine.config file & then looks in application configuration files, Web.config, can appear in multiple directories on an ASP.NET Web application server. Each Web.config file applies configuration settings to its own directory and all child directories below it. There is only Machine.config file on a web server.