Dot Net Interview Questions

.NET Deployment Questions

1. What do you know about .NET assemblies?
Assemblies are the smallest units of versioning and deployment in the .NET application. Assemblies are also the building blocks for programs such as Web services, Windows services, serviced components, and .NET remoting applications.

2. What’s the difference between private and shared assembly?
Private assembly is used inside an application only and does not have to be identified by a strong name. Shared assembly can be used by multiple applications and has to have a strong name.

3. What’s a strong name?
A strong name includes the name of the assembly, version number, culture identity, and a public key token.

ASP.NET Questions

# What base class do all Web Forms inherit from? System.Web.UI.Page

# What method do you use to explicitly kill a user’s session?
The Abandon method destroys all the objects stored in a Session object and releases their resources.
If you do not call the Abandon method explicitly, the server destroys these objects when the session times out.

Syntax: Session.Abandon

# How do you turn off cookies for one page in your site?
Use the Cookie.Discard Property which Gets or sets the discard flag set by the server. When true, this property instructs the client application not to save the Cookie on the user’s hard disk when a session ends.

ASP.NET questions II

# Whats an assembly?
Assemblies are the building blocks of .NET Framework applications; they form the fundamental unit of deployment, version control, reuse, activation scoping, and security permissions. An assembly is a collection of types and resources that are built to work together and form a logical unit of functionality. An assembly provides the common language runtime with the information it needs to be aware of type implementations. To the runtime, a type does not exist outside the context of an assembly.

.NET and COM interop questions

# Describe the advantages of writing a managed code application instead of unmanaged one. What’s involved in certain piece of code being managed?
The advantages include automatic garbage collection, memory management, support for versioning and security. These advantages are provided through .NET FCL and CLR, while with the unmanaged code similar capabilities had to be implemented through third-party libraries or as a part of the application itself.

# Are COM objects managed or unmanaged?
Since COM objects were written before .NET, apparently they are unmanaged.

# So can a COM object talk to a .NET object?
Yes, through Runtime Callable Wrapper (RCW) or PInvoke.

COM/COM+ services and components in .NET

  1. Explain transaction atomicity. We must ensure that the entire transaction is either committed or rolled back.
  2. Explain consistency. We must ensure that the system is always left at the correct state in case of the failure or success of a transaction.
  3. Explain integrity. Ensure data integrity by protecting concurrent transactions from seeing or being adversely affected by each other’s partial and uncommitted results.
  4. Explain durability. Make sure that the system can return to its original state in case of a failure.

Pages (13): « First ... « 4 5 6 [7] 8 9 10 » ... Last »