Thursday, December 27, 2007

NET deployment questions

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.
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.
What s a strong name?
A strong name includes the name of the assembly, version number, culture
identity, and a public key token.
How can you tell the application to look for assemblies at the locations other
than its own install?
Use the directive in the XML .config file for a given application.
Explain what a diffgram is, and a good use for one?
A DiffGram is an XML format that is used to identify current and original
versions of data elements. The DataSet uses the DiffGram format to load and
persist its contents, and to serialize its contents for transport across a network
connection. When a DataSet is written as a DiffGram, it populates the DiffGram
with all the necessary information to accurately recreate the contents, though not
the schema, of the DataSet, including column values from both the Original and
Current row versions, row error information, and row order.
Where would you use an iHTTPModule, and what are the limitations of
anyapproach you might take in implementing one?
One of ASP.NET s most useful features is the extensibility of the HTTP pipeline,
the path that data takes between client and server. You can use them to extend
your ASP.NET applications by adding pre- and post-processing to each HTTP
request coming into your application. For example, if you wanted custom
authentication facilities for your application, the best technique would be to
intercept the request when it comes in and process the request in a custom HTTP
module.
What are the disadvantages of viewstate/what are the benefits?

Describe session handling in a webfarm, how does it work and what are the
limits?
How would you get ASP.NET running in Apache web servers - why would
you even do this?
Whats MSIL, and why should my developers need an appreciation of it if at
all?
In what order do the events of an ASPX page execute. As a developer is it
important to undertsand these events?
Every Page object (which your .aspx page is) has nine events, most of which you
will not have to worry about in your day to day dealings with ASP.NET. The
three that you will deal with the most are: Page_Init, Page_Load,
Page_PreRender.
Which method do you invoke on the DataAdapter control to load your
generated dataset with data?
System.Data.Common.DataAdapter.Fill(System.Data.DataSet);
If my DataAdapter is sqlDataAdapter and my DataSet is dsUsers then it is called
this way:
sqlDataAdapter.Fill(dsUsers);
ata in the Repeater control?
Which template must you provide, in order to display data in a Repeater
control?
ItemTemplate
How can you provide an alternating color scheme in a Repeater control?
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.
What property must you set, and what method must you call in your code, in
order to bind the data from some data source to the Repeater control?
You must set the DataMember property which Gets or sets the specific table in
the DataSource to bind to the control and the DataBind method to bind data from
a source to a server control. This method is commonly used after retrieving a data
set through a database query.
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.
Which two properties are on every validation control?
ControlToValidate &
ErrorMessage properties
What tags do you need to add within the asp:datagrid tags to bind columns
manually?
How do you create a permanent cookie?
Setting the Expires property to MinValue
means that the Cookie never expires.
What tag do you use to add a hyperlink column to the DataGrid?
What is the standard you use to wrap up a call to a Web service?
Which method do you use to redirect the user to another page without
performing a round trip to the client?
Server.transfer()
What is the transport protocol you use to call a Web service?
SOAP. Transport Protocols: It is essential for the acceptance of Web Services that
they are based on established Internet infrastructure. This in fact imposes the
usage of of the HTTP, SMTP and FTP protocols based on the TCP/IP family of
transports. Messaging Protocol: The format of messages exchanged between Web
Services clients and Web Services should be vendor neutral and should not carry
details about the technology used to implement the service. Also, the message
format should allow for extensions and different bindings to specific transport
protocols. SOAP and ebXML Transport are specifications which fulfill these
requirements. We expect that the W3C XML Protocol Working Group defines a
successor standard.
True or False: A Web service can only be written in .NET.
False.
What does WSDL stand for?
Web Services Description Language
What property do you have to set to tell the grid which page to go to when using
the Pager object?
Where on the Internet would you look for Web services?
UDDI repositaries like uddi.microsoft.com, IBM UDDI node , UDDI Registries in
Google Directory , enthusiast sites like XMethods.net
What tags do you need to add within the asp:datagrid tags to bind columns
manually?
Column tag and an ASP:databound tag.
Which property on a Combo Box do you set with a column name, prior to
setting the DataSource, to display data in the combo box?
How is a property designated as read-only?
In VB.NET:

Public ReadOnly Property PropertyName As ReturnType
Get Your Property Implementation
goes in here
End Get
End Property
in C#
public returntype PropertyName
{
get{
//property implementation goes here
}
// Do not write the set implementation
}
Which control would you use if you needed to make sure the values in two
different controls matched?
Use the CompareValidator control to compare the values
of 2 different controls.
True or False: To test a Web service you must create a windows application or
Web application to consume this service?
False.
How many classes can a single .NET DLL contain?
Unlimited.

No comments: