Sunday, January 31, 2010

.NET configuring optimizing

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:
Element is the top-level element for all configuration files.
Element specifies assembly binding policy at the configuration level.
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.     

How to use performance monitor to diagnose bottlenecks in your application?     

Monitor is a tool built to assist you in diagnosing the problem.
Type ‘perfmon’ in command prompt to access Performance Monitor
The counters, sampling intervals, etc can be used to monitor the performance.
A baseline should be established so that critical reference points, changes and trends can be observed and identified.
Results can be made more readable by removing all the distracting sample noise so that the graphical view of trend lines is not blurred. This can be done using buckets - a vertical line, indicating the minimum, average, and maximum of the sample points in the bucket.
It should be noted that the bottlenecks can be caused due to over utilization of physical disk, memory, process, CPU, and network. 

-         Machine configuration file, Application configuration file, Security configuration file.

-         Explain the different types of configuration files provided by .NET framework

The different types of configuration files provided by .NET framework are:
  • enterprisesec.config which configures the enterprise-level security policies.
  • security.config which configures machine-level security policies.
  • machine.config which contains the installation settings.
  • app.config or web.config which are used to modify the default settings of the machine.config file

What is AppSetting section in Web.Config file?

The element of a web.config file where connection strings, server names, file paths, and other miscellaneous settings are stored. The items inside appSettings need to be configurable depending upon the environment

0 Comments: