Ganesan S

FAQ - Dot NET

Interview Questions and Answer - Dot Net

Dot Net.

.Net Framework FAQ.

Assemblies
Assemblies are building block of dot net framework.
It's a small deployment unit.
It's a functionality of code.
It's a versoning control,reuse and security permissions.
Assembly is created in the form of DLL or Exe.Whenever we complie and build our application the assembly is created.
An Assembly contains more than one classes,resources and along with exe or DLL.

All Assembly file contain the only one entry point that is (dllMain,WinMain or Main).Each assembly contains the following things
 1. Meta data
 2. Manifest
 3. Referenced Assembly
 4. Resources

Metadata is nothing but the data about the data.
               Metadata means Data about the data.metadata yields the types available in that assembly, viz. classes, interfaces, enums, structs, etc., and their containing namespaces, the
name of each type, its visibility/scope, its base class, the interfaces it implemented, its methods and their scope, and each method’s parameters, type’s properties, and so on.
    The assembly metada is generated by the high-level compilers automatically from the source files. The compiler embeds the metadata in the target output file, a dll, an .exe or a .netmodule in the case of multi-module assembly.

Manifest Maintains the information about the assemblies like version, name locale and an optional strong name that uniquely identifying the assembly. This manifest information is used by the CLR. The manifest also contains the security demands to verify this assembly. It also contains the names and hashes of all the files that make up the assembly. The .NET assembly manifest contains a
cryptographic hash of different modules in the assembly. And when the assembly is loaded, the CLR recalculates the hash of the modules at hand, and compares it with the
embeded hash. If the hash generated at runtime is different from that found in the manifest, .NET refuses to load the assembly and throws an exception.

Two types of assembly
    1. Private assembly
    2. Public/Shared assembly
    3. And Satellite assembly.

There are two type of Debugger in .Net
Visual Studio  uses the CLRDBG default.
ColDBG    Command Line Debugger or Console of Line Debugger
CLRdbg    Graphical design Debugger

Connection pools

Connection pools are used to enhance the performance of executing commands on a database. Opening and maintaining a database connection for each user, especially requests made to a dynamic database-driven website application, are costly and lead to wastage of resources. In connection pooling, after a connection is created, it is placed in the pool and it is used over again so that a new connection does not have to be established. If all the connections are being used, a new connection is made and is added to the pool. Connection pooling also cuts down on the amount of time a user must wait to establish a connection to the database

          To improve server performance, the ASP Server can be configured to share database connections among multiple users who are accessing the Web application. This is called database connection pooling. With connection pooling, rather than opening and closing a database connection for each individual request, the ASP Server uses a connection that is already open.

The JDCConnectionPool.java class makes connections available to calling program in its getConnection method. This method searches for an available connection in the connection pool. If no connection is available from the pool, a new connection is created. If a connection is available from the pool, the getConnection method leases the connection and returns it to the calling program.

In software engineering, a connection pool is a cache of database connections maintained by the database so that the connections can be reused when the database receives future requests for data.

There is no maximum number of connections that can be pooled. Setting this number to 0 (zero) disables connection pooling.

The default is 25.