.NET
Framework Interview Questions
1. What are Web
services?
·
Web services
are functions exposed by server-side applications.
·
They are
programmable units that other applications (and Web services) can access over
the Internet.
2. What are
session management techniques in .NET?
There are three
different techniques of managing session in ASP.NET
1.InProc.
Session state is stored locally in memory of ASP.NET worker process.
2.StateServer
Session state is stored outside ASP.NET worker process and is managed by Windows service.
1.InProc.
Session state is stored locally in memory of ASP.NET worker process.
2.StateServer
Session state is stored outside ASP.NET worker process and is managed by Windows service.
Location of
this service is specified by stateConnectionString attribute.
3.SQLServer
Session state is stored outside ASP.NET worker process in SQL Server database. Location of this database is represented by sqlConnectionString attribute.
3.SQLServer
Session state is stored outside ASP.NET worker process in SQL Server database. Location of this database is represented by sqlConnectionString attribute.
3. What is MVC
(Model View Controller) pattern?
·
The
Model-View-Controller (MVC) pattern separates the modeling of the domain, the
presentation, and the actions based on user input into three separate classes
Model.
Model.
·
The model
manages the behavior and data of the application domain, responds to requests
for information about its state (usually from the view), and responds to
instructions to change state (usually from the controller).
·
View. The view manages the display of
information.
·
Controller. The controller interprets the mouse
and keyboard inputs from the user, informing the model and/or the view to
change as appropriate.
4. How to use
trace in libraray classes (like BAL, DAL)?
·
Use following
code to use Trace.Warn, Trace.Write
etc.
·
System.Web.HttpContext.Current.Trace
5. What is
gacutil.exe?
·
It's a command
to install the assembly into the Global Assembly Cache.
6. What is
boxing and unboxing?
Converting a
value type to reference type is called Boxing and Converting reference type of
value type is Unboxing.
int i = 1;
object o = i;
// boxing
int j = (int)
o; // unboxing
7. Difference
between Response.Expires and Response.ExpiresAbsolute?
Response.Expires
This property specifies the number of minutes before a page cached in the browser expires ie. if the user returns to the same page before the specified number of minutes the cached version of the page is displayed.
<% Response.Expires = minutes %>
Response.ExpiresAbsolute
Using this property we can set the date and/or time at which page cached in the browser expires.
<% Response.ExpiresAbsolute=#May 15, 1999 18:00:00# %>
8. What is CLR
(Common Language Runtime)?
This is an execution engine for .NET Framework application. It provides a number of services including
1. Code Management
2. Application memory isolation
3. Verification of type safety
4. Conversion of IL to native code.
5. Access to meta data
6. Managing memory for managed objects
7. Enforcement of code access security
8. Exception handling, including cross-language exceptions.
9. Inter operation between managed code, COM objects and pre-existing DLLs (Unmanaged code and data)
10. Automation of object layout
11. Support for developer services (profiling, debugging etc.)
9. When to use
String and StringBuilder class?
·
Use the String class
to concat, join or format methods to join multiple items in a single
statement.
·
Use StringBuilder class
to create dynamic strings.
10. String is a
value type or reference type?
String is a reference type variable.
11. List few
ValueTypes variables.
Below are all
ValueTypes variables.
1. System.SByte,
2. System.Byte
3. System.Int16
4. System.Int32
5. System.Int64
6. System.Single
7. System.Double
8. System.Decimal
9. System.Char
10.
System.Boolean
11.
System.DateTime
12. What is the
use of RCW & CCW?
·
RCW : Runtime
Collable Wrapper takes a COM component, wrap it up and allows .NET client to
consume it.
·
CCW: COM Collable
Wrapper wraps a .NET object for consumption by COM client
13. What is
StringCollection?
·
StringCollection
is a simple resizable collection of strings
14. Where
reference and value types variables are stored?
·
All reference
type variables are stored in heap (Random) and all value types variables are
stored in stack (Sequential).
15. What is
Singleton pattern?
·
Singleton
pattern ensures a class has only one instance & provide a global point of
access to it.
·
It is achieved
by declaring a static variable for the class & checking for null before
actually instantiating it.
16. What is
CTS?
·
CTS (Common
Type System) is a rich type system, build into the common language runtime that
supports the types and operations found in most of the programming languages.
·
The common type
system supports the complete implementation of a wide range of programming
language.
17. What is
CLS?
·
CLS (Common
Language Specification) is a set of constructs or constraints that serves as a
guide for library writers and compiler writers.
·
It allows
libraries to be fully usable from any language supporting the CLS, and for
those languages to integrate with each other.
·
The CLS is a
subset of common type system.
·
The common language specifications is also
important to application developers wh are writing code that will be used by
other developers.
18. What is
MSIL?
·
MSIL (Microsoft
Intermediate Language) is a CPU-Independent instructions set into which .NET
Framework programs are compiled.
·
It contains
instructions for loading, storing, initializing and calling methods on objects.
19. What is
Satellite Assembly?
·
It is a often
used to deploy language specific resources for an application.
·
These
assemblies work in side-by-side execution because the application has a
separate product ID for each language & installed satellite assemblies in a
language specific sub-directory.
·
When
uninstalling, the application removes only the satellite assemblies associated
within a give language & .NET Framework version.
20. What is
RSS?
·
RSS (Really
Simple Syndication/Rich Site Summary) is a light weight XML format for
distributing news headlines or site summary & other contents of the
website.
No comments:
Post a Comment