You are on page 1of 15

Question:-What do you mean by Share Point Portal ?

Answer: Here I have taken information regarding Share Point Portal Server 2003 provides mainly
access to the crucial business information and applications.With the help of Share Point Server we
can server information between Public Folders, Data Bases, File Servers and the websites that
are based on Windows server 2003. This Share Point Portal is integrated with MSAccess and
Windows servers,So we can get a Wide range of document management functionality. We can
also create a full featured portal with readymade navigation and structure.

Question:-What is cross page posting in ASP.NET2.0 ?


Answer: When we have to post data from one page to another in application we used
server.transfer method but in this the URL remains the same but in cross page posting there is
little different there is normal post back is done but in target page we can access values of server
control in the source page.This is quite simple we have to only set the PostBackUrl property of
Button,LinkButton or imagebutton which specifies the target page.In target page we can access
the PreviousPage property.And we have to use the @PreviousPageType directive.We can access
control of PreviousPage by using the findcontrol method.When we set the PostBackURL property
ASP.NET framework bind the HTML and Javascript function automatically.

Question:-How to call method that handles the Click event for several buttons ?
Answer: Protected Sub AnyClicked(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Button1.Click, Button2.Click, Button3.Click
Dim b As Button = CType(sender, Button)
Response.Write("You clicked the button labeled " & b.ID) End Sub

Question: Difference between System exceptions and Application exceptions ?


Answer: In ASP.NET all exception derives from Exception which is Base class. Exceptions can be
generated programmatically or can be generated by system. Application Exception serves as the
base class for all applicationspecific exception classes. It derives from Exception but does not
provide any extended functionality. You should derive your custom application exceptions from
Application Exception. Application exception is used when we want to define user defined
exception, while system exception is all which is defined by .NET.

Question: What is the difference between Shadowing and overriding ?


Answer: Overriding redefines only the implementation while shadowing redefines the whole
element.On the other side In overriding derived classes can refer the parent class element by
using “ME” keyword, but in shadowing you can access it by “MYBASE”.

Question: What is the use of App_Code folder in asp.net ?


Answer: :- Its name helps us to understand what is this in another way we can say that its
automatically accessible in the application. App_Code Folder store classes, typed data set, text
files, Reports etc. If we don’t have this folder in web application we can add this folder. One of
more significant feature of this is a single dll is created of this folder. If we have two different
language classes in this folder then we have to create two folder one for one language.

Question: What is diffrence between Debug and Trace class ?


Answer: Debug Class helps to set methods and properties that helps in debugging code. If we use
methods in Debug class for print debugging information and checking our logic with cases, we can
make our code more robust without impacting the performance and code size. On the other side
we use the properties and methods in the Trace class to release builds and instrumentation allows
us to monitor the condition of our application running in real-life settings. Tracing helps us to know
problems and fix them without interact a running system. Trace is enabled by default in visual
2005. So code is generated for all trace methods in both release and debug builds.

Question: What do you mean by Web Part Control in asp.net ?


Answer: ASP.NET Web Parts controls are the integrated controls which helps in creation of Web
sites that also help users to modify the content as well as appearance, and behavior of pages of
web sites that are open in browser.
Question: What changes are done in IIS 6.0 over IIS 5.0 ?
Answer: IIS makes easy to get information.IIS 6.0 is the next latest of web server available in
Windows Server 2003 platform. IIS 6.0 contains several enhancements over IIS 5.0 that are
mainly to increase reliability, manageability, scalability, and security. IIS 6.0 is a key component of
the Windows Server 2003 application platform, using which you can develop and deploy high
performance ASP.NET Web applications, and XML Web Services.

Question: Com Marshler function in .NET ?


Answer: Com Marshler is useful component of CLR.Main work of marshal data between Managed
and Unmanaged environment .It helps in representation of data accross diffrenet execution
enviroment.Its also convert data format between manage and unmanaged code.By the helps of
Com Marshlar CLR allows manage code to interoperate with unmanaged code.

Question: How Visual SourceSafe helps Us ?


Answer: One of the powerful tool provided by Microsoft to keep up-to-date of files system its keeps
records of file history once we add files to source safe it can be add to database and the changes
ade by diffrenet user to this files are maintained in database from that we can get the older version
of files to.This also helps in sharing,merging of files.

Question: What is main difference between GridLayout and FormLayout ?


Answer: GridLayout helps in providing absolute positioning of every control placed on the page.It
is easier to devlop page with absolute positioning because control can be placed any where
according to our requirement.But FormLayout is little different only experience Web Devloper used
this one reason is it is helpful for wider range browser.If there is absolute positioning we can notice
that there are number of DIV tags.But in FormLayout whole work are done through the tables.

Question: What is the purpose of IIS ?


Answer: We can call IIS(Internet Information Services) a powerful Web server that helps us
creating highly reliable, scalable and manageable infrastructure for Web application which runs on
Windows Server 2003. IIS helps development center and increase Web site and application
availability while lowering system administration costs. It also runs on Windows NT/2000 platforms
and also for above versions. With IIS, Microsoft includes a set of programs for building and
administering Web sites, a search engine, and support for writing Web-based applications that
access database. IIS also called http server since it process the http request and gets http
response.

Question: How to start Outlook,NotePad file in AsP.NET with code ?


Answer: Here is the syntax to open outlook or notepad file in ASP.NET VB.NET
Process.Start("Notepad.exe") Process.Start("msimn.exe"); C#.NET
System.Diagnostics.Process.Start("msimn.exe");
System.Diagnostics.Process.Start("Notepad.exe");

Question: What you thing about the WebPortal ?


Answer: Web portal is nothing but a page that allows a user to customize his/her homepage. We
can use Widgets to create that portal we have only to drag and drop widgets on the page. The
user can set his Widgets on any where on the page where he has to get them. Widgets are
nothing but a page area that helps particular function to response. Widgets example are address
books, contact lists, RSS feeds, clocks, calendars, play lists, stock tickers, weather reports, traffic
reports, dictionaries, games and another such beautiful things that we can not imagine. We can
also say Web Parts in Share Point Portal. These are one of Ajax-Powered.

Question:-Can you define what is SharePoint and some overview about this ?
Answer: SharePoint helps workers for creating powerful personalized interfaces only by dragging
and drop pre-defined Web Part Components. And these Web Parts components also helps non
programmers to get information which care and customize the appearance of Web pages. To
under stand it we take an example one Web Part might display a user's information another might
create a graph showing current employee status and a third might show a list of Employees
Salary. This is also possible that each functions has a link to a video or audio presentation.So now
Developers are unable to create these Web Part components and make them available to
SharePoint users.

Question:-What is different between WebUserControl and in WebCustomControl ?


Answer: Web user controls :- Web User Control is Easier to create and another thing is that its
support is limited for users who use a visual design tool one gud thing is that its contains static
layout one more thing a seprate copy is required for each application.
Web custom controls:-Web Custom Control is typical to create and gud for dynamic layout and
another thing is it have full tool support for user and a single copy of control is required because it
is placed in Global Assembly cache.

Question:-What is Sandbox in SQL server and explain permission level in Sql Server ?
Answer: Sandbox is place where we run trused program or script which is created from the third
party. There are three type of Sandbox where user code run.
Safe Access Sandbox:-Here we can only create stored procedure,triggers,functions,datatypes
etc.But we doesnot have acess memory ,disk etc.
External Access Sandbox:-We cn access File systems outside the box. We can not play with
threading,memory allocation etc.
Unsafe Access Sandbox:-Here we can write unreliable and unsafe code.

Question:-How many types of cookies are there in .NET ?


Answer: Two type of cookeies.
a) single valued eg request.cookies(”UserName”).value=”dotnetquestion”
b)Multivalued cookies. These are used in the way collections are used example
request.cookies(”CookiName”)(”UserName”)=”dotnetquestionMahesh”
request.cookies(”CookiName”)(”UserID”)=”interview″

Question: When we get Error 'HTTP 502 Proxy Error' ?


Answer: We get this error when we execute ASP.NET Web pages in Visual Web Developer Web
server, because the URL randomly select port number and proxy servers did not recognize the
URL and return this error. To resolve this problem we have to change settings in Internet Explorer
to bypass the proxy server for local addresses, so that the request is not sent to the proxy.

Question:-What do you mean by three-tier architecture?


Answer: The three-tier architecture was comes into existence to improve management of code and
contents and to improve the performance of the web based applications.There are mainly three
layers in three-tier architecture.the are define as follows
(1)Presentation
(2)Business Logic
(3)Database
(1)First layer Presentation contains mainly the interface code, and this is shown to user. This
code could contain any technology that can be used on the client side like HTML, JavaScript or
VBScript etc.
(2)Second layer is Business Logic which contains all the code of the server-side .This layer have
code to interact with database database and to query, manipulate, pass data to user interface and
handle any input from the UI as well.
(3)Third layer Data represents the data store like MS Access, SQL Server, an XML file, an Excel
file or even a text file containing data also some addtional database are also added to that layers.

Question: What is Finalizer in .NET define Dispose and Finalize ?


Answer: We can say that Finalizer are the methods that's helps in cleanp the code that is executed
before object is garbage collected .The process is called finalization . There are two methods of
finalizer Dispose and Finalize .There is little diffrenet between two of this method .
When we call Dispose method is realse all the resources hold by an object as well as all the
resorces hold by the parent object.When we call Dispose method it clean managed as well as
unmanaged resources.
Finalize methd also cleans resources but finalize call dispose clears only the unmanged resources
because in finalization the garbase collecter clears all the object hold by managed code so
finalization fails to prevent thos one of methd is used that is: GC.SuppressFinalize.

Question: Define SMTPclient class in DotNet framework class libarary ?


Answer: Each classes in dotnet framework inclue some properties,method and events.These
properties ,methods and events are member of a class.SMTPclient class mainly concern with
sending mail.This class contain the folling member.
Properties:-
Host:-The name or IP address of email server.
Port:-Port that is use when sending mail.
Methods:-
Send:-Enables us to send email synchronously.
SendAsynchronous:-Enables us to send an email asynchronously.
Event:-
SendCompleted:-This event raised when an asynchronous send opertion completes.

Question: What is late binding ?


Answer: When code interacts with an object dynamically at runtime .because our code literally
doesnot care what type of object it is interacting and with the methods thats are supported by
object and with the methods thats are supported by object .The type of object is not known by the
IDE or compiler ,no Intellisense nor compile-time syntax checking is possible but we get
unprecedented flexibilty in exchange.if we enable strict type checking by using option strict on at
the top of our code modules ,then IDE and compiler will enforce early binding behaviour .By
default Late binding is done.

Question:-Does .NET CLR and SQL SERVER run in different process ?


Answer: Dot Net CLR and all .net realtes application and Sql Server run in same process or we
can say that that on the same address because there is no issue of speed because if these two
process are run in different process then there may be a speed issue created one process goes
fast and other slow may create the problem.

Question:-What is Com Marshler and its importance in .NET ?


Answer: Com Marshler is one of useful component of CLR. Its Task is to marshal data between
Managed and Unmanaged environment .It helps in representation of data accross diffrenet
execution enviroment.It performs the conversion of data format between manage and unmanaged
code.By the helps of Com Marshlar CLR allows manage code to interoperate with unmanaged
code.

Question: What is CSU and its description ?


Answer: CSU stands for comma separate values also called comma delimited.It is plain text file
which stores spreadsheets or basic datatype in very simple format.One record in each line and
each field separted with comma's it is often used to transfer large ammount spreadsheet data or
database information between program.

Question: The IHttpHandler and IHttpHandlerFactory interfaces ?


Answer: The IHttpHandler interface is implemented by all the handlers. The interface consists of
one property called IsReusable. The IsReusable property gets a value indicating whether another
request can use the IHttpHandler instance. The method ProcessRequest() allows you to process
the current request. This is the core place where all your code goes. This method receives a
parameter of type HttpContext using which you can access the intrinsic objects such as Request
and Response. The IHttpHandlerFactory interface consists of two methods - GetHandler and
ReleaseHandler. The GetHandler() method instantiates the required HTTP handler based on
some condition and returns it back to ASP.NET. The ReleaseHandler() method allows the factory
to reuse an existing handler.

Question: what is Viewstate?


Answer:View state is used by the ASP.NET page framework to automatically save the values of
the page and of each control just prior to rendering to the page. When the page is posted, one of
the first tasks performed by page processing is to restore view state.
State management is the process by which you maintain state and page information over multiple
requests for the same or different pages.
Client-side options are:

* The ViewState property * Query strings


* Hidden fields * Cookies

Server-side options are:

* Application state * Session state * DataBase

Use the View State property to save data in a hidden field on a page. Because ViewState stores
data on the page, it is limited to items that can be serialized. If you want to store more complex
items in View State, you must convert the items to and from a string.
ASP.NET provides the following ways to retain variables between requests:
Context.Handler object Use this object to retrieve public members of one Web form’s class from
a subsequently displayed Web form.
Query strings Use these strings to pass information between requests and responses as part of
the Web address. Query strings are visible to the user, so they should not contain secure
information such as passwords.
Cookies Use cookies to store small amounts of information on a client. Clients might refuse
cookies, so your code has to anticipate that possibility.
View state ASP.NET stores items added to a page’s ViewState property as hidden fields on the
page.
Session state Use Session state variables to store items that you want keep local to the current
session (single user).
Application state Use Application state variables to store items that you want be available to all
users of the application.

Question: DOTNET PAGE LIFECYCLE ?


Answer: While excuting the page, it will go under the fallowing steps(or fires the events) which
collectivly known as Page Life cycle.
Page_Init -- Page Initialization
LoadViewState -- View State Loading
LoadPostData -- Postback data processing
Page_Load -- Page Loading
RaisePostDataChangedEvent -- PostBack Change Notification
RaisePostBackEvent -- PostBack Event Handling
Page_PreRender -- Page Pre Rendering Phase
SaveViewState -- View State Saving
Page_Render -- Page Rendering
Page_UnLoad -- Page Unloading

Question: What is Satellite Assemblies ?


Answer: Satellite assemblies are often used to deploy language-specific resources for an
application. These language-specific assemblies work in side-by-side execution because the
application has a separate product ID for each language and installs satellite assemblies in a
language-specific subdirectory for each language. When uninstalling, the application removes only
the satellite assemblies associated with a given language and .NET Framework version. No
core .NET Framework files are removed unless the last language for that .NET Framework version
is being removed. For example, English and Japanese editions of the .NET Framework version 1.1
share the same core files. The Japanese .NET Framework version 1.1 adds satellite assemblies
with localized resources in a \ja subdirectory. An application that supports the .NET Framework
version 1.1, regardless of its language, always uses the same core runtime files.
Question: What is CAS ?
Answer:CAS: CAS is the part of the .NET security model that determines whether or not a piece
of code is allowed to run, and what resources it can use when it is running. For example, it is CAS
that will prevent a .NET web applet from formatting your hard disk. How does CAS work? The CAS
security policy revolves around two key concepts - code groups and permissions. Each .NET
assembly is a member of a particular code group, and each code group is granted the permissions
specified in a named permission set. For example, using the default security policy, a control
downloaded from a web site belongs to the 'Zone - Internet' code group, which adheres to the
permissions defined by the 'Internet' named permission set. (Naturally the 'Internet' named
permission set represents a very restrictive range of permissions.)

Question: Automatic Memory Management ?


Answer: Automatic Memory Management: From a programmer's perspective, this is probably the
single biggest benefit of the .NET Framework. No, I'm not kidding. Every project I've worked on in
my long career of DOS and Windows development has suffered at some point from memory
management issues. Proper memory management is hard. Even very good programmers have
difficulty with it. It's entirely too easy for a small mistake to cause a program to chew up memory
and crash, sometimes bringing the operating system to a screeching halt in the process.

Programmers understand that they're responsible for releasing any memory that they allocate, but
they're not very good at actually doing it. In addition, functions that allocate memory as a side
effect abound in the Windows API and in the C runtime library. It's nearly impossible for a
programmer to know all of the rules. Even when the programmer follows the rules, a small memory
leak in a support library can cause big problems if called enough.

The .NET Framework solves the memory management problems by implementing a garbage
collector that can keep track of allocated memory references and release the memory when it is no
longer referenced. A large part of what makes this possible is the blazing speed of today's
processors. When you're running a 2 GHz machine, it's easy to spare a few cycles for memory
management. Not that the garbage collector takes a huge number of cycles--it's incredibly
efficient.
The garbage collector isn't perfect and it doesn't solve the problem of mis-managing other scarce
resources (file handles, for example), but it relieves programmers from having to worry about a
huge source of bugs that trips almost everybody up in other programming environments.
On balance, automatic memory management is a huge win in almost every situation.

Question: What Language familar to CLR?


Answer: Any language that can be compiled into Microsoft Intermediate Language (MSIL) is
considered a .NET-compliant language. Following are a few of the popular .NET-compliant
languages supported by CLR:

APL COBOL Component Pascal Eiffel


Fortran Haskell JScript Mercury
Oberon Pascal Perl Python
Smalltalk Visual Basic Visual C# Visual C++

Question:-How ADO.NET come into existence ?


Answer: DAO (data access model) is the first Data Access Model that is created for local
databases which contains built-in Jet engine which overcome with some problem like performance
and functionality issues. After this RDO (Remote Data Object) and ADO (Active Data Object)
comes in market which basically designed for Client Server applications but soon ADO is more
comfort then RDO. ADO a good architecture. ADO contained all the data in a recordset object
which creates problems when implemented on the network where firewalls exist. Because ADO
was a connected data access, which make connection open until the application is closed. This
creates issue like database security and network traffic. Because open database connections use
system resources to a maximum extent making the system performance less effective. This helps
in developing of ADO.NET.
Question: What is Asynchronous Database Commands ?
Answer:- When we execute any database. Thread that executing the command waits before the
command get fully executing before executing any additional code. Thread is blocked for another
process. But Asynchronous Database Commands solve this problem when database command is
executing the current thread can continue on other process.Thread can execute a no of database
command. There are two benefits of using Asynchronous Database Commands.
1) Executing Multiple Databse Commands simultaneously improve performance.
2) Because ASP.Net framework uses a limited pool service for request. Whenany request for a
page is comes its assign a thread to handle the request. If framework is out of thread then job is in
gueses we get error 503. But if we are using asynchronous database command then current
thread is release back to current thread pool.

Question:-What is Concurrency and its types?


Answer: When two or more people try to update same type of data then Concurrency helps how to
handle this situation there are two types of concurrency
Pessimistic:-When one user try to change the data with pessimistic concurrency a lock is placed
on the data so that another user cannot change that one after one another can
change.Optimistic:-In this if two user works on the same data and one change that data first then
second user cannot change that same data becasue the which he have using is allready changed
so he cannot do the change becasue change apply to another data that is changed by first user.

Question: Which should be prefer in which condition DataSet and DataReader ?


Answer: The data reader is helpful when we have number of tables and large query too and
database in non-uniform pattern and we need not execute the large no. of queries on few
particular table. On the other hand when we have low number of table and most of the time you
need to execute queries on these fewer tables, we should go for the dataset.

Question: What do you mean by Attributes and Reflection ?


Answer: Attributes is a techniques for adding metadata, just like compiler instructions and other
data about your data, methods, and classes, to the program itself. Attributes are inserted into the
metadata and are visible through ILDasm and other metadata-reading tools. Reflection is the
process from which a program can read metadata that of its own. A program is said to reflect on
itself, extracting metadata from its assembly and using that metadata either to inform the user or to
modify its own behavior.

Question: What is a command object in ADO.NET? and Type of command object?


Answer: ADO.NET recognizes three types of commands. The first type is text commands, which
are those text commands that are sent to the database server directly and written in specific SQL
Dialect (for SQL Server, MSDE and Access it's T-SQL). The commandType.Text is the default for
the property CommandType of the Command object. The second type is the
CommandType.StoredProcedure which is set to call a specific stored procedure in the database;
of course when you set the Command.CommandType property to
CommandType.StoredProcedure, the value of the Command.CommandText must be the name of
the stored procedure that you are calling. Finally, the type CommandType.TableDirect is used to
return a complete table from the database, and it's used only by the OLEDB .NET Data Provider.

Question: What is MARS support in ADO.NET ?


Answer: In First version of ADO.NET we only do is one connection on one result set. But the new
feature allow us to do multiple commands on the same connection. And another feature is we can
switch back and forth in command objects in connection.MARS means(Multiple Active
ResultSets).

Question: Which one is better WebService and Remoting ?


Answer: Both of these have little difference WebService helpfull where the user who is using
WebService doesnot have the .NET plateform. On the otherside for remoting we need .Net
plateform on the both side so from both of this remoting is faster then webservice.So keep in mind
which of these are you using if you have .net plateform or other.
Question: How to get database schema information when connection object is establish in
ADO.NET ?
Answer: There is a method that helps in getting schema information that is GetSchema() and this
method is called in three different ways first way when we call this method without any parameter
its return the metadata(table, view, stored procedure.indexes etc).When method is called by
passing metadata collection name and filter criteria returns the items from the collection after
applying the filter criteria and last way is when we called by passing a metadata collection name
returns information about items found in the specified collection.

Question: Some important instruction regarding ADO.NET connection string ?


Answer: When we are making connection string always use Server's IP address not the DNS
name if we use IP address it will reduce the time taken for connection to establish.Becasue server
IP address is used to get a default or named instance of Sql Server that ls running. if we are
running the cluster we have to use the Virtual SQL Server IP address.

Question: Define tool Manage Statistics in SQL Serevr 2000 query ?


Answer: SQL Server creates internal statistics on the rows in all of our tables that is used by the
Query Optimizer to select the optimal execution plan for our query. And Query Optimizer helps in
doing this.Soome time when statistics isnot maintains then this is done by tool Manage
Statistics.We can add,edit or delete for statistics that is maintained by SQL Server.We can
experiment with different sets of statistics and see how it affects the query otimizer execution
plans.

Question: What is Ref Cursor in .NET and how it is link with ExecuteReader ?
Answer: Ref cursor play its role when doing with the oracle database these comes in ODP.NET.
Ref Cursors are objects that link to Oracle server-side cursors.These Ref Cursor can be converted
in oracle datareader with this Ref cursor we can get result with query written to pl/sql and the result
can be get in .net.Now the question arise why we use Ref Cursor when we have an option of
ExceuteReader reson is simple when we need more query in pl/sql means our work is done in
pl/sql then we need this ref cursor for getting result set because doennot have direct connection to
that table.Becasue advantage of pl/sql we can take two opertion in one query.

Question: How to get result from two table in SqlDataReader ?


Answer: string str="Select * from table1;Select * from table2"; cmd.commandtext=str;
dr=cmd.executereader();

Question: How to start Outlook,NotePad file in AsP.NET with code ?


Answer: Here is the syntax to open outlook or notepad file in ASP.NET VB.NET
Process.Start("Notepad.exe") Process.Start("msimn.exe"); C#.NET
System.Diagnostics.Process.Start("msimn.exe");
System.Diagnostics.Process.Start("Notepad.exe");

Question:-What is DataGrid wheater its a Server Control or something else ?


Answer:DataGrid is Web server control a powerful tool for displaying information from a data
source. we can display editable data in a professional-looking grid by setting only a few properties.
The grid has a sophisticated object model that provides you with great flexibility in how you display
the data.

Question:-Define different execute methods of ADO.NET command object ?


Answer: ExecuteScalar:- This method returns a single value from the first row and first column of
the result get from the execution of SQL query.
ExecuteNonQuery:- This method executes the DML SQL query just like insert, delete or update
and then returns the number of rows affected by the action.
ExecuteReader:- This method returns DataReader object which is a forward-only resultset.
ExecuteXMLReader:- This method is available for SQL Server 2000 or later. Upon execution it
builds XMLReader object from standard SQL query.
Question:-What DataReader class do in ADO.NET ?
Answer:To get read-only and forward only access to data we use DataReader .the DataReader
object reduces the system overhead because one row at a time is taken into memory so it is quite
lightweight. To get second object connection is reconnected. We can create a DataReader object
by execute Execute readre() method. There are two Data Reader class one is SqlDataReader and
other is OleDbDataReader.

Question:-Why is ADO.NET serialization slower than ADO ?


Answer: ADO uses binary serialization while ADO.NET uses text based serialization. Since the
text takes more space, it takes longer to write it out.

Question:-Is XML is a component of ADO.NET ?


Answer: The answer of this question is always Yes because XML is an important component of
ADO.NET architecture .ADO.NET use XML to store and transfer data.We not have to convert data
to XML format.Datasets helps XML to integrate with ADO.NET. XML schema plays a role to get
table definition,column,datatypes and constraints helps DataSet.

Question:- How to check if the Dataset has records ?


Answer:
if ds.Tables(0).Rows.Count= 0 then
'No record
else
'record found

Question:- What is the significance of CommandBehavior.CloseConnection ?


Answer: To avoid having to explicitly close the connection associated with the command used to
create either a SqlDataReader or and OleDbDataReader, pass the
CommandBehavior.CloseConnection argument to the ExecuteReader method of the Connection.

dr= cmd.ExecuteReader(CommandBehavior.CloseConnection);

The associated connection will be closed automatically when the Close method of the Datareader
is called. This makes it all the more important to always remember to call Close on your
datareaders.

Question:-Which method do you invoke on the DataAdapter control to load your generated
dataset with data?
Answer: The Fill() method.

Question:-What is Dataset and Diffgram?


Answer: When sending and retrieving a DataSet from an XML Web service, the DiffGram format
is implicitly used. Additionally, when loading the contents of a DataSet from XML using the
ReadXml method, or when writing the contents of a DataSet in XML using the WriteXml method,
you can select that the contents be read or written as a DiffGram. For more information, see
Loading a DataSet from XML and Writing a DataSet as XML Data. While the DiffGram format is
primarily used by the .NET Framework as a serialization format for the contents of a DataSet, you
can also use DiffGrams to modify data in tables in a Microsoft SQL Server™ 2000 database.

Question:-What is typed dataset ?


Answer: A typed dataset is very much similar to a normal dataset. But the only difference is that
the sehema is already present for the same. Hence any mismatch in the column will generate
compile time errors rather than runtime error as in the case of normal dataset. Also accessing the
column value is much easier than the normal dataset as the column definition will be available in
the schema.

Question:-How can you provide an alternating color scheme in a Repeater control?


Answer: AlternatingItemTemplate Like the ItemTemplate element, but rendered for every other
row (alternating items) in the Repeater control. You can specify a different appearance for the
AlternatingItemTemplate element by setting its style properties.

Question:-What are good ADO.NET object(s) to replace the ADO Recordset object?
Answer: There are alot...but the base once are SqlConnection, OleDbConnection, etc...

Question:-Can you explain the difference between an ADO.NET Dataset and an ADO
Recordset?
Answer:Valid answers are:

• A DataSet can represent an entire relational database in memory, complete with tables,
relations, and views.
• A DataSet is designed to work without any continuing connection to the original data
source.
• Data in a DataSet is bulk-loaded, rather than being loaded on demand.
• There's no concept of cursor types in a DataSet.
• DataSets have no current record pointer You can use For Each loops to move through the
data.
• You can store many edits in a DataSet, and write them to the original data source in a
single operation.
• Though the DataSet is universal, other objects in ADO.NET come in different versions for
different data sources.

Question:-What are the differences between Datalist DataGrid and datarepeater ?


Answer:DataList

• Has table appearence by default


• Has no autoformat option
• has no default paging & sorting options
• can define separators between elements using template
DataGrid
• Has a grid appearence by default
• has a autoformat option
• has default paging and sorting
• has no separator between elements
DataRepeater
• simple,read-only output, has no built in support for selecting or editing items, has no
DEFAULT APPEARENCE, has no default paging.

Question: What do u mean by Function Overloading ?


Answer: When more than one function is created with the same name, but different is of there
arguments . In other words, function names can be overloaded. A function may also have the
same name as an attribute. In the case that there is an ambiguity between a function on a
complex type and an attribute of the complex type, the attribute will always be used.

Question: What Is OOPS ?


Answer: OOPs is an Object Oriented Programming language,which is the extension of Procedure
Oriented programming language.OOPS reduce the code of the program because of the extensive
feature of Polymorphism. OOPS have many properties such as Data-Hiding,Inheritence,Data
Absraction,Data Encapsulation and many moreEverything in the world is an object. The type of the
object may vary. In OOPS, we get the power to create objects of our own, as & when required.

Question: what is Class ?


Answer:A group of objects that share a common definition and that therefore share common
properties, operations, and behavior. A user-defined type that is defined with the class-key 'class,'
'struct,' or 'union.' Objects of a class type consist of zero or more members and base class
objects.Classes can be defined hierarchically, allowing one class to be an expansion of another,
and classes can restrict access to their members.
Question: What is Constructor?
Answer:When we create instance of class a special method of that class, called that is
constructor. Similarly, when the class is destroyed, the destructor method is called. These are
general terms and usually not the actual member names in most object-oriented languages. It is
initialized using the keyword New, and is destroyed using the Keyword Finalize.

Question: What is Abstract Class ?


Answer:Classes that cannot be instantiated. We cannot create an object from such a class for use
in our program. We can use an abstract class as a base class, creating new classes that will
inherit from it. Creating an abstract class with a certain minimum required level of functionality
gives us a defined starting point from which we can derive non-abstract classes. An abstract class
may contain abstract methods & non-abstract methods. When a class is derived from an abstract
class, the derived class must implement all the abstract methods declared in the base class. We
may use accessibility modifiers in an abstract class.An abstract class can inherit from a non-
abstract class. In C++, this concept is known as pure virtual method.

Question: What is ValueType?


Answer:Value Types - Value types are primitive types. Like Int32 maps to System.Int32, double
maps to System.double.All value types are stored on stack and all the value types are derived
from System.ValueType. All structures and enumerated types that are derived from
System.ValueType are created on stack, hence known as ValueType.In value type we create a
copy of object and uses there value its not the original one.

Question: What is diff. between abstract class and an interface?


Answer: An abstract class and Interface both have method only but not have body of method.The
difference between Abstract class and An Interface is that if u call Ablstract class then u have to
call all method of that particular Abstract class but if u call an Interface then it is not necessary that
u call all method of that particular interface.Method OverLoading:-Return type, Parameter type,
parameter and body of method number may be different.Method Overriding:- Return type,
Parameter type, Parameter Number all must be same . Only body of method can change.

Question: Can you define basic element of WebServices and explain any one from them?
Answer: These are as follows SOAP, WSDL and UDDI. And I am explaining about the
SOAP(Simple Object Access Protocol) it is a communication protocol it is for communication
between application it is platform and language independent.It is based on XML and also help to
get from Firwall.

Question: Explain functioning of Web Services Protocols ?


Answer: Http-Get:- This is standard protocol that helps client to communicate with server with
HTTP.When client send a request to server via HTTP request and reuired parameter are attached
with the querystring.Example:-
http://www.dotnetquestion.info/dotnet/interview.aspx?id=pervej&cast=munjal and we get the value
from querystring.
Request.querystring("id")
Request.querystring("cast").

Http-Post:-This is same as Http-Get but the diffrence is that in place of sending parameters onto
the URL information is send with HTTP request message with some extra information which
contains Parameters and their values.This Protocols is limited to sending name/value
pairs.SOAP:-The only diffrence is that its relies on the XML as compares to Http-Get,Http-
Post.SOAP can send not only the name/value pairs but also some complex object also as for
example datatypes,class,objects.SOAP can also uses request/reponse model as Http-Get,Http-
post but it is not limited to Request/Response it can also send types of message.Because its uses
XML that is pure text so firewalls not created so much problem because its easily converted in to
HTML. .

Question: Which one is better Remoting or WebServices ?


Answer: Remoting involves efficient communication or exchange of data when we have control on
both ends of the application involved in the communication process. Web Services is open-
protocol-based exchange of informaion. Web Services play there role when we need to
communicataion with external organization or whicj doesnot have .NET technology.

Question: How .NET and non .NET component communicate with each other when they are
on different platform?
Answer: In past when we have to communicate .NET with non .NET component we are using
COM component this component helps in doing this. At the moment we are using in both apps a
COM component that has an intermediary Windows service running on one machine. But this
component is quite old and not in use now because it will create a problem when we are using
firewall. So to handle this we use Web-Services which really have a solution for Firewall.

Question: Why do some web service classes derive from System.Web.WebServices while
others do not ?
Answer: Those asp net Web Service classes which employ objects like Application, Session,
Context, Server, and User have to derive from System.Web.WebServices. If it does not use these
objects, it is not necessary to be derived from it.

Question: What is WSDL ?


Answer: WSDL is an XML format for describing network services as a set of endpoints operating
on messages containing either document-oriented or procedure-oriented information. The
operations and messages are described abstractly, and then bound to a concrete network protocol
and message format to define an endpoint. Related concrete endpoints are combined into abstract
endpoints (services). (Source: www.w3.org).

Question: What is the standard you use to wrap up a call to a Web service ?
Answer: HTTP with SOAP.

Question: What is Asp Net Web Services ?


Answer: Web services are programmable business logic components that provide access to
functionality through the Internet. Standard protocols like HTTP can be used to access them. Web
services are based on the Simple Object Access Protocol (SOAP), which is an application of XML.
Web services are given the .asmx extension..

Question: Define Protocols that helps Web Services in Asp Net?


Answer: From my point of view Web Services used three protocols for interacting with the
clients.Http-Post,Http-Get,SOAP.

Question: What are VSDISCO files ?


Answer: VSDISCO files are DISCO files that enable dynamic discovery of Web Services.
ASP.NET links the VSDISCO to a HTTP handler that scans the host directory and subdirectories
for ASMX and DISCO files and returns a dynamically generated DISCO document. A client who
requests a VSDISCO file gets back what appears to be a static DISCO document.

Question: What is UDDI ?


Answer: UDDI stands for Universal Description, Discovery, and Integration. It is like an "Yellow
Pages" for Web Services. It is maintained by Microsoft, IBM, and Ariba, and is designed to provide
detailed information regarding registered Web Services for all vendors. The UDDI can be queried
for specific Web Services.

Question: Is it possible to generate the source code for an ASP.NET Web service from a
WSDL ?
Answer: The Wsdl.exe tool (.NET Framework SDK) can be used to generate source code for an
ASP.NET web service with its WSDL link.
Example: wsdl /server http://api.google.com/GoogleSearch.wsdl.

Question: Can you give an example of when it would be appropriate to use a web service as
opposed to a non-serviced .NET component ?
Answer: When to Use Asp Net Web Services:
(i)Communicating through a Firewall When building a distributed application with 100s/1000s of
users spread over multiple locations, there is always the problem of communicating between client
and server because of firewalls and proxy servers. Exposing your middle tier components as Web
Services and invoking the directly from a Windows UI is a very valid option.

(ii)Application Integration When integrating applications written in various languages and running
on disparate systems. Or even applications running on the same platform that have been written
by separate vendors.

(iii)Business-to-Business Integration This is an enabler for B2B intergtation which allows one to
expose vital business processes to authorized supplier and customers. An example would be
exposing electronic ordering and invoicing, allowing customers to send you purchase orders and
suppliers to send you invoices electronically.

(iv)Software Reuse This takes place at multiple levels. Code Reuse at the Source code level or
binary componet-based resuse. The limiting factor here is that you can reuse the code but not the
data behind it. Webservice overcome this limitation. A scenario could be when you are building an
app that aggregates the functionality of serveral other Applicatons. Each of these functions could
be performed by individual apps, but there is value in perhaps combining the the multiple apps to
present a unifiend view in a Portal or Intranet.

Question: What are Service Oriented Architectures (SOA) ?


Answer: SOA describes an information technology architecture that enables distributed computing
environments with many different types of computing platforms and applications. Web services in
asp net are one of the technologies that help make SOAs possible. As a concept, SOA has been
around since the 1980s, but many early IT technologies failed to achieve the goal of linking
different types of applications and systems. By making early investments with .NET, Microsoft has
helped provide the building blocks that today are putting many enterprise customers on the path to
successfully implementing SOAs. With SOAs, companies can benefit from the unimpeded flow of
information that is the hallmark of connected systems.

Question: What is .NET Passport ?


Answer: .NET Passport is a Web-based service that is designed to make signing in to Web sites
fast and easy. Passport enables participating sites to authenticate a user with a single set of sign-
in credentials, alleviating the need for users to remember numerous passwords and user names.

Question:-What is Serialization Formatters in .NET Remoting ?


Answer: When any object is to be sent across the transport channel, it must be serialized and
packed into a data format that can be transmitted with the wire. On the other end of the wire, this
serialized data is read and deserialized back to the actual object. This Serialization is done by
message-serialization formatters which convert the field or object's state into a format that is
helpful for storage or transmission. Dot Net framework provides us two message-serialization
formatters one of them is a binary serialization formatter which converts an object's state into a
binary stream and other is SOAP serialization formatter which converts it into an XML string
representation that's human readable. The binary serialization formatter much slightly faster.

Question:-What is Channels ?
Answer: Remote objects are accessed through Channels. Channels physically transport the
messages to and from remote objects. There are two existing channels TcpChannel and
HttpChannel. Their names give away the protocols that they use. In addition, the TcpChannel or
HttpChannel can be extended, or a new channel created if you determine the existing channels do
not meet your needs.

Question:-What is .NET Remoting ?


Answer: .NET Remoting is an enabler for application communication. It is a generic system for
different applications to use to communicate with one another. .NET objects are exposed to
remote processes, thus allowing interprocess communication. The applications can be located on
the same computer, different computers on the same network, or even computers across separate
networks.

Question:- .NET Remoting versus Distributed COM ?


Answer: In the past interprocess communication between applications was handled through
Distributed COM, or DCOM. DCOM works well and the performance is adequate when
applications exist on computers of similar type on the same network. However, DCOM has its
drawbacks in the Internet connected world. DCOM relies on a proprietary binary protocol that not
all object models support, which hinders interoperability across platforms. In addition, have you
tried to get DCOM to work through a firewall? DCOM wants to communicate over a range of ports
that are typically blocked by firewalls. There are a ways to get it to work, but they either decrease
the effectiveness of the firewall (why bother to even have the firewall if you open up a ton of ports
on it), or require you to get a firewall that allows support for binary traffic over port 80..NET
Remoting eliminates the difficulties of DCOM by supporting different transport protocol formats and
communication protocols. This allows .NET Remoting to be adaptable to the network environment
in which it is being used.

Question: Can you explain what is remotable and non-remotable objects ?


Answer: The remotable objects are the objects which can be distributed accross domains, can be
used with domain. The non-remotable objects are the objects which can't be distributed accross
domains. In distributed system, if an object is very big, we can make it non-remotable object.

Question:- Security in Remoting ?


Answer: Security is of paramount importance to any distributed application. Although the .NET
Remoting infrastructure does not define any security features itself, because distributed
applications are managed code they have full access to all of the .NET security features. In
addition, the HTTP channel, when used with IIS, allows you to take full advantage of the
authentication and authorization features that are available to Web based protocols. If you choose
to use a protocol other than HTTP with IIS, then you have the opportunity to create your own
security infrastructure.

Question:-Advantage of Remoting over Web Services ?


Answer: .NET Remoting is a distributed objects infrastructure. It allows processes to share
objects—to call methods on and access properties of objects that are hosted in different
application domains within the same process, different processes executing on the same
computer, on computers on an intranet, or on computers distributed over wide areas. .NET
Remoting supports many different communications protocols, including the SOAP/HTTP protocol
used by ASP.NET Web services. Support for other protocols makes it possible to provide much
faster communications in .NET Remoting than would be possible with ASP.NET Web services.
The ASP.NET programming model is tied specifically to IIS, and is limited to creating Web
services that use the producer/consumer model. .NET Remoting, on the other hand, can share
objects from any type of application.

The .NET Remoting system, as an integral part of the .NET Framework, supports full .NET type
system fidelity. You can pass any object across the wire to a client. This is in contrast to ASP.NET,
which is limited to data types that can be expressed with WSDL and XSD.

Question:- Scope of publication ?


Answer: .NET Remoting exposes objects to other application domains as if they are local, with a
few exceptions. The two exceptions most likely to trip you up are:
• Static members are never remoted. Remoting always deals with some form of object instance
member.
• Private methods are never remoted. You cannot wrap and pass a delegate to a private method.
This includes remote event handlers.
The other exceptions are less likely to cause you trouble. The online documentation provides a
complete list and explanation of the exceptions.
Question:-What are the Proxies ?
Answer: In the general sense, a proxy is any object that stands in for another, either servicing
requests directly or passing the requests on to the object for which it is standing in. In .NET
Remoting, the proxy manages the marshaling process and the other tasks required to make cross-
boundary calls. The .NET Remoting infrastructure automatically handles creation and
management of proxies, although it is possible to create your own proxy classes to plug in to and
customize proxy creation, marshaling, and other proxy-related tasks.

Question:-What is Abstract ?
Answer: .NET Remoting provides a powerful and high performance way of working with remote
objects. Architecturally, .NET Remote objects are a perfect fit for accessing resources across the
network without the overhead posed by SOAP based WebServices. .NET Remoting is easier to
use than Java's RMI, but definately more difficult than creating a WebService.

Question:-Some Important Notes


Answer: The dependence on assembly metadata implies that client applications must
understand .NET concepts. As a result, applications that make use of .NET Remoting are not
interoperable with other systems. Although it's possible to write an XML Web service using .NET
Remoting, it's not practical when you consider that ASP.NET is designed specifically for that task.
In most cases, in order to use .NET Remoting, both the client and the server must be .NET
applications. This makes .NET Remoting a poor choice if you want non-.NET clients to access
your service.

Before we get into the nuts and bolts of how Remoting works and how to write programs that take
advantage of it, you need to understand some basic Remoting concepts.

Question:-.NET Remoting Overview ?


Answer: .NET Remoting is very flexible. You have a wide range of communications options and
activation methods, as well as full control over a distributed object's lifecycle. You can choose TCP
or HTTP communications protocols on any port, using text or binary formatting. The .NET
Remoting infrastructure supports server activated (single call and singleton) and client activated
objects. .NET Remoting gives you many opportunities to "plug in" to the system to customize
lifecycle management, marshaling, serialization, messaging, and other services.

You might also like