Interview Question Bank.
1.What is the
difference between user controls and custom controls?
CUSTOM CONTROLS are DLL'S.It can be placed in the
toolbox.Drag and drop controls.
USER CONTROLS: are pages (.ascx).It can not be placed in the
tool box.
2.what are the 3
types of session state modes?
a.Inproc-session kept as live object in the web
server(aspnet_wp.exe)
b.Stateserver-Session serialized and stored in memory in a
seperate process(aspnet_state.exe),we can use for webform architecture.
c.SQLServer-Session serialized and stored in sql server.
3. what are the 6
types of validation controls in ASP.NET?
1.Required Field validator.2.Range validator.3.Regular
Expression validator.4.compare validator.5custom validator.
6.validation summary.
4.What are the 3
types of caching in ASP.NET?
1. Output Caching(Page Caching)- stores the responses from
an asp.net page(aspx) or user control(.ascx).
2.Fragment Caching(Partial Caching)- Only stores the portion
of a page.
3. Data Caching is the programmatic way to your objects to a
managed cache.
//Add item
Cache["TopProducts"] = objTopProductsDataset;
//Retrieve item
objDataset = Cache["TopProducts"];
5.How to Manage state
in ASP.NET?
we can manage the state in two ways
Clent based techniques are
Viewstate, Query strings and Cookies.
Server based techniques are
Application and Session
6.What is the
difference between overloading and shadowing?
Overloading ----------- A Member has the name, but something
else in the signature is different.
Shadowing --------- A member shadows another member if the
derived member replaces the base member
7.what is the
difference between overloading and overriding?
Overloading : Method name remains the same with different
signatures.
Overriding : Method name and Signatures must be the same.
8.what is the
difference between Manifest and Metadata?
Manifest:
Manifest describes assembly itself.
Assembly Name,version number,culture,strongname,listof all
all files,Type references,and referenced assemblies.
MetaData:
Metadata describes contents in an assembly
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.
9.What is Boxing and
Unboxing?
Boxing is an implicit conversion of a value type to the type
object
int i = 123; // A value type
Object box = i // Boxing
CASTING : casting is the process of converting a variable
from one type to another (from a string to an integer )
Unboxing is an explicit conversion from the type object to a
value type
int i = 123; // A value type
object box = i; // Boxing
int j = (int)box; // Unboxing
10.what are the
method parameter in c#?
C# is having 4 parameter types which are
1.Value Parameter. default parameter type. Only Input
2.Reference(ref) Parameter. Input\Output
3.Output(out) Parameter.
4.Parameter(params) Arrays
11.what are value
types and reference types?
Value type
bool, byte,chat, decimal,double,enum , float, int, long,
sbyte, short, strut, uint, ulong, ushort
Value types are stored in the Stack
Reference type
class, delegate, interface, object, string
Reference types are stored in the Heap
12.what are the two
activation modes for .NET Remoting?
1. Singleton 2. Singlecall
13.what's singlecall
Activation mode used for ?
The Server Object is instantiated for responding to just one
single request
14.what's the
singleton Activation mode used for?
The server object is instantiated for responding number of
clients
15.what are the
channels and Formatters?
Channels
HTTP and TCP
Binay Over TCP is most efficient
SOAP over HTTP is most interoperable
Formatters
Binary and SOAP
16.What are the two
Authentication modes for SQL server connection?
1. Trusted Connection - Windows Authentication
2. Non trusted Connection - Sql Server Authentication(its
preferable for webservices)
17.What is typed
dataset?
Data Access is normally done using indexes on collectionsin
object model.
In ADO.NET it is possible to create a variation on a Dataset
that does support
such syntax.Such Dataset is called "Typed
Dataset".
Errors in the syntax are detected during compile time rather
than runtime.
Advantages of Typed Dataset:
1.The data designer tool generates typed Datasets.
2.When we type the name of a dataset while writing a code,
weget a list of all available tables in the dataset.No need
to
remember the table names.
For (eg) instead of typing
myDataset.Tables("products")
we can type
myDataset.products.
18.what is
DataReader?
DataReader is a read only stream of data returned from
the database as the query executes.
It contains one row of data in memory at a time and is
restricted to navigating forward only in the results one
record at a time.
Datareader supports access to multiple result sets but only
one at a time and in the order retrieved.
In ADO
data is no longer available through the Datareaderoncethe connection to the
datasource is closed
which means a Datareader requires a connection to the
Database throughout its usage.
o/p parameters or return values are only available thrugh
the Datareader once the connection is closed.
19.Difference between
Dataset and Recordset?
The Recordset was not XML-based and could not be serialized
to XML easily or flexibly.
Finally, a Recordset was not independent of a data store
because it tracked a Connection object
and through its methods could send queries to the data
source to populate, update,
and refresh its data.
To that end, the Recordset contained functionality found in
the ADO.NET DataSet,
data reader, and data adapter objects.
Similar to the DataSet, a Recordset could be disconnected
from its data store
and therefore act as an in-memory cache of data.
Of course, it could also be used in a connected model
depending on the cursor options that were set.
Although the Recordset object stored multiple versions of
each column for each of its rows,
it was not by nature able to represent multiple tables
without the use of the Data Shape Provider.
.
21.What is an
Assembly, Private Assembly and SharedAssembly,Strong Name?
Assembly: Assemblies are basically the compiled code in .Net
which contains the code in Microsoft Intermediate Language and one more thing
that assemblies do for us as compared to dlls is they can maintain versioning
with the help of the manifest.
You don’t need to register the assemblies after compiling
like we needed in dlls. You can put the assemblies in the bin folder and refer
the namespaces from there.
In short find the assembly description as:
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.
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.
Strong Name: A strong name includes the name of the
assembly, version number, culture identity, and a public key token.
22. What is an
Delegate?
A strongly typed function pointer. A delegate object
encapsulates a reference to a method.
23. What are
webservices?
A Web Service is an application that delivers a service
across the Internet using the standards and technologies defined in the Web
Services architecture in a platform-independent and language-neutral fashion.
Web Services rely on several XML protocols based on open
standards that are collectively known as the Web Services architecture
24.Define Automatic
memory Management:
c# Provides Automatic memory Management.
Automatic memory Management increases code quality and
enhances developer productivity without negatively impacting
either expressivenessor perfromance.Developers are freed
from this burdensome task.
25.Define Threading:
It's a process of creating applications that can perform
multiple tasks independently.
26 Difference Between
XML AND HTML?
XML:
User definable tags.
Content driven
End tags required for well formed documents
Quotes required around attributes values
Slash required in empty tags
HTML :
Defined set of tags designed for web display
Format driven
End tags not required
Quotes not required
Slash not required
27.What is XSLT and
what is it's use?
XSL Transformations (XSLT) is yet another popular W3C
specification that defines XML-based syntax, used to transform XML documents to
any other text format, such as HTML, text, XML, etc. XSLT stylesheets can be
applied on the source XML document to transform XML into some other XML, or
text, HTML, or any other text format.
28.What is Diffgram?
It's an XML format.
It's one of the two xml formats that use to render Dataset
object contents to XML.
For reading database data to an XML file to be sent to a
webservice.
29.what is the Role
of XSL?
Querying a database and then formatting the result set so
that it can be validated as an XML document allows developers to translate the
data into an HTML table using XSLT rules. Consequently, the format of the
resulting HTML table can be modified without changing the database query or
application code since the document rendering logic is isolated to the XSLT
rules
30.What is SAX?
Simple API for XML Processing (SAX) is an alternative to
DOM, and can be used to parse XML documents. SAX is based on streaming model.
The SAX parser reads input XML stream and generates various parsing events that
an application can handle. With each parsing event, the parser sends sufficient
information about the node being parsed. Unlike DOM, SAX does not build an
in-memory representation of the source XML document, and hence it is an
excellent alternative when parsing large XML documents, as SAX does not require
that much memory (and resources). Unlike DOM, SAX is not defined/controlled by
W3C. See http://www.saxproject.org/ for details.
32.Give a few
examples of types of applications that can benefit from using XML.
XML allows content management systems to store documents
independently of their format, which thereby reduces data redundancy. Another
answer relates to B2B exchanges or supply chain management systems. In these
instances, XML provides a mechanism for multiple companies to exchange data
according to an agreed upon set of rules. A third common response involves
wireless applications that require WML to render data on hand held devices.
33.When constructing
an XML DTD, how do you create an external entity reference in an attribute
value?
when using SGML, XML DTDs don't support defining external
entity references in attribute values.
34.Give some examples
of XML DTDs or schemas that you have worked with.
Although XML does not require data to be validated against a
DTD, many of the benefits of using the technology are derived from being able
to validate XML documents against business or technical architecture rules.
Polling for the list of DTDs that developers have worked with provides insight
to their general exposure to the technology.commonly used DTDs such as FpML,
DocBook, HRML, and RDF, as well as experience designing a custom DTD for a
particular project
35.What is SOAP and
how does it relate to XML?
The Simple Object Access Protocol (SOAP) uses XML to define
a protocol for the exchange of information in distributed computing
environments. SOAP consists of three components: an envelope, a set of encoding
rules, and a convention for representing remote procedure calls. Unless
experience with SOAP is a direct requirement for the open position, knowing the
specifics of the protocol, or how it can be used in conjunction with HTTP, is
not as important as identifying it as a natural application of XML.
36.What is WSDL?
Another key standard in the Web Services architecture is the
Web Services Description Language, or WSDL for short. Whereas SOAP is
responsible for providing a platform-neutral protocol for transporting data
types and interapplication messaging, WSDL is an XML grammar responsible for
exposing the methods, arguments, and return parameters exposed by a particular
Web Service.
37.What’s the
difference between authentication and authorization?
Authentication happens first. You verify user’s identity
based on credentials. Authorization is making sure the user only gets access to
the resources he has credentials for.
38.Explain loosely
coupled events. Loosely coupled events enable an object (publisher) to
publish an event. Other objects (subscribers) can subscribe to an event. COM+
does not require publishers or subscribers to know about each other. Therefore,
loosely coupled events greatly simplify the programming model for distributed
applications.
39.Define
scalability.
The application meets its requirement for efficiency even if
the number of users increases.
40.Define
reliability.
The application generates correct and consistent information
all the time.
41.Define
availability.
Users can depend on using the application when needed.
42.Define security.
The application is never disrupted or compromised by the
efforts of malicious or ignorant users
43.Define
manageability.
Deployment and maintenance of the application is as
efficient and painless as possible
44.Explain
durability.
Make sure that the system can return to its original state
in case of a failure.
45.Explain integrity.
Ensure data integrity by protecting concurrent transactions
from seeing or being adversely affected by each other’s partial and uncommitted
results.
46.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.
47.Explain JIT
activation.
The objective of JIT activation is to minimize the amount of
time for which an object lives and consumes resources on the server. With JIT
activation, the client can hold a reference to an object on the server for a
long time, but the server creates the object only when the client calls a
method on the object. After the method call is completed, the object is freed
and its memory is reclaimed. JIT activation enables applications to scale up as
the number of users increases
48.Define
Constructors and destructors
The create and destroy methods - often called constructors
and destructors - are usually implemented for any abstract data type.
Occasionally, the data type's use or semantics are such that there is only ever
one object of that type in a program. In that case, it is possible to hide even
the object's `handle' from the user. However, even in these cases, constructor
and destructor methods are often provided.
Of course, specific applications may call for additional
methods, e.g. we may need to join two collections (form a union in set
terminology) - or may not need all of these.
Hey Nice blog,Thanks for sharing this blog.!!!
ReplyDeleteBest Summer training in lucknow
Best Php training in lucknow
Summer training in lucknow
Apprenticeship Training in Lucknow