Describe the configuration files in .Net. What are different types of configuration files in .Net framework?
The Machine.Config file, which specifies the settings that are global to a particular machine.
This file is located at the following path:
\WINNT\Microsoft.NET\Framework\[Framework Version]\CONFIG\machine.config
The simplest way to add application-specific settings into an application configuration file is to use an application configuration file.
The file is an XML file and contains add elements with key and value attributes.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="ApplicationTitle" value="Sample Console Application" />
<addkey="ConnectionString"value="Server=localhost;Database=Northwind;Integrated Security= false;UserId=sa;Password=;" />
</appSettings>
</configuration>
<authentication>
The authentication section controls the type of authentication used within your Web application Windows, Forms or Passport type of authentication can be defined.
Example:
<authentication mode="Windows" />
<allow> or <deny> tags can be used with authorization to allow or deny access to your web application to certain users or roles,
<authorization>
<allow roles="Administrators,Users" />
<deny users="*" />
</authorization>