You work as a Software Developer for company Inc. The company uses Visual Studio.NET 2008 as its
application development platform. You have recently finished development of an ASP.NET Web
application using the .NET Framework 3.5. You are required to make a configuration setting change
that will be global to all Web and Windows applications on the current computer. What will you do
to accomplish this task?
A.
Make changes in the resource file.
B.
Make changes in the Web.config file.
C.
Make changes in the Machine.config file.
D.
Make changes in the Global.asax file.
Explanation:
You will make changes in the Machine.config file, to accomplish this task. The Machine.config file
controls the configuration settings for the entire computer. It includes settings specific to a
computer, such as built-in remoting channels, machine-wide assembly binding, and ASP .NET
configuration settings. The configuration system first searches for APIs and ASP .NET settings in the
machine.config file. The default configuration of the .NET Framework is declared in the
Machine.config file.Answer D is incorrect. The Global.asax is an optional file that contains code for responding to global
events that occur in a Web application. There can be only one Global.asax file for an application. This
file resides in the root directory of an ASP.NET application. External users cannot download or view
the code written within the Global.asax file.Answer A is incorrect. A resource file is an XML file that contains text based on the user’s preferred
language setting for the Web browser. A separate resource file can be created for each particularlanguage or culture. The resource file is stored with a.resx extension in a Web application directory
and is compiled dynamically. The .resx file is compiled into a satellite assembly at runtime.Answer B is incorrect. The Web.config is an XML file that consists of a series of settings specific to an
application. Whenever a new Web service project is created in Visual Studio .NET, the Web.config
file is automatically created and added to the project. It contains a number of empty settings and
text that explain each section and its use. Example of a minimal Web.config file is as follows:
<?xml version=”1.0″ encoding=”utf-8″ ?>
<configuration>
<system.web>
Add configuration setting here
</system.web>
</configuration>
Add the configuration settings of an ASP.NET application between the <system.web> and
</system.web> lines.