How Can You Enable Automatic Paging in Datagrid ?
How Can You Enable Automatic Paging in Datagrid ?
To use default paging, you set properties to enable paging, set the page size, and specify
the style of the paging controls. Paging controls are LinkButton controls. You can choose
from these types: Next and previous buttons. The button captions can be any text you
want. Page numbers, which allow users to jump to a specific page. You can specify how
many numbers are displayed; if there are more pages, an ellipsis ( … ) is displayed next
to the numbers. You must also create an event-handling method that responds when users
click a navigation control.
To use the built-in paging controlsSet the control’s AllowPaging property to true. Set the
PageSize property to the number of items to display per page.
To set the appearance of the paging buttons, include a element into the page as a child of
the DataGrid control. For syntax, see DataGrid Control Syntax. Create a handler for the
grid’s PageIndexChanged event to respond to a paging request. The
DataGridPageChangedEventsArgs enumeration contains the NewPageIndex property,
which is the page the user would like to browse to. Set the grid’s CurrentPageIndex
property to e.NewPageIndex, then rebind the data.
RAID stands for Redundant Array of Inexpensive Disks, used to provide fault tolerance
to database servers. There are six RAID levels 0 through 5 offering different levels of
performance, fault tolerance. MSDN has some information about RAID levels and for
detailed information, check out the RAID advisory board’s homepage
You can deploy an ASP.NET Web application using any one of the following three
deployment options.1.XCOPY Deployment
2.Using the Copy Project option in VS .NET
3.Deployment using VS.NET installer
web.config:
Web.config file, as it sounds like is a configuration file for the Asp .net web application. An
Asp .net application has one web.config file which keeps the configurations required for
the corresponding application. Web.config file is written in XML with specific tags having
specific meanings.
machine.config
As web.config file is used to configure one asp .net web […]
Supporting .Net, bcoz DLL made in C#.Net semicompiled version. Its not a com object.
It is used only in .Net Framework.As it is to be compiled at runtime to byte code.
If A.equals(B) is true then A.getHashcode & B.getHashCode must
always return same hash code.
The answer is False because it is given that A.equals(B) returns true i.e. objects are equal
and now its hashCode is asked which is always independent of the fact that whether
objects are equal or not. So, GetHashCode for both of the objects returns different value.
Actually JIT activation is required for COM+ components which can be done by setting
JustInTimeActivation attribute to true (choice A). For .net applications / components JIT
comes in by default.
The fixed statement sets a pointer to a managed variable and “pins” that variable during
the execution of statement.
Without fixed, pointers to managed variables would be of little use since garbage
collection could relocate the variables unpredictably. (In fact, the C# compiler will not
allow you to set a pointer to a managed variable except […]
Destructors are called in reverse order of constructors. First destructor of most derived
class is called followed by its parent’s destructor and so on till the topmost class in the
hierarchy.
You don’t have control over when the first destructor will be called, since it is determined
by the garbage collector. Sometime after the object goes […]
Continue Reading ASP.Net Interview Questions
How can you sort the elements of the array in descending order?
The system always reads the current value of a volatile object at the point it is requested,
even if the previous instruction asked for a value from the same object. Also, the value of
the object is written immediately on assignment.
The volatile modifier is usually used for a field that is accessed by multiple threads […]
1.� � CorDBG – command-line debugger.� To use CorDbg, you must compile the
original C# file using the /debug switch.
2.� � DbgCLR – graphic debugger.� Visual Studio .NET uses the DbgCLR.
Unlike classes, structs are value types and do not require heap allocation. A variable of a
struct type directly contains the data of the struct, whereas a variable of a class type
contains a reference to the data. They are derived from System.ValueType class.
Enum->An enum type is a distinct type that declares a set of […]
Value Type : A variable of a value type always contains a value of that type. The
assignment to a variable of a value type creates a copy of the assigned value, while the
assignment to a variable of a reference type creates a copy of the reference but not of the
referenced object.
The value […
What is manifest?
The Debug.Write call won’t be compiled when the DEBUGsymbol is not defined (when
doing a release build). Trace.Write calls will be compiled. Debug.Write is for information
you want only in debug builds, Trace.Write is for when you want it in release build as
well.
There are 5 transactions types that can be used with COM+. Whenever an object is
registered with COM+ it has to abide either to these 5 transaction types.
Disabled: - There is no transaction. COM+ does not provide transaction support for this
component.
Not Supported: - Component does not support transactions. Hence even if the calling
component […]
The purpose of Canonical XML is to define a standard format for an XML document.
Canonical XML is a very strict XML syntax, which lets documents in canonical XML be
compared directly.
Using this strict syntax makes it easier to see whether two XML documents are the same.
For example, a section of text in one document might read Black & White, whereas the
same section of text might read Black & White in another document, and even in another.
If you compare those three documents byte by byte, they’ll be different. But if you write
them all in canonical XML, which specifies every aspect of the syntax you can use, these
three documents would all have the same version of this text (which would be Black &
White) and could be compared without problem. This Comparison is especially critical
when xml documents are digitally signed. The digital signal may be interpreted in different
way and the document may be rejected.Continue Reading ASP.Net Interview Questions
What are the mobile devices supported by .net platform?
The Microsoft .NET Compact Framework is designed to run on mobile devices such as
mobile phones, Personal Digital Assistants (PDAs), and embedded devices. The easiest
way to develop and test a Smart Device Application is to use an emulator.
These devices are divided into two main divisions:
1) Those that are directly supported by .NET (Pocket PCs, […]
What is a Windows Service and how does its lifecycle differ from a
“standard” EXE?
The Repeater class is not derived from the WebControl class, like the DataGrid and
DataList. Therefore, the Repeater lacks the stylistic properties common to both the
DataGrid and DataList. What this boils down to is that if you want to format the data
displayed in the Repeater, you must do so in the HTML markup. […]
What is a PostBack?
The process in which a Web page sends data back to the same page on the server.
VSDISCO files are DISCO files that support dynamic discovery of Web services. If you
place the following VSDISCO file in a directory on your Web server, for example, it
returns� � references to all ASMX and DISCO files in the host directory and any
subdirectories not noted in elements:
What namespace does the Web page belong in the .NET Framework
class hierarchy?
System.Web.UI.Page
The CLR computes actual permissions at runtime based on code group membership and
the calling chain of the code.
Continue Reading ASP.Net Interview Questions
Using System.Security.Permissions;
[assembly:FileDialogPermissionAttribute(SecurityAction.RequestMinimum,
Unrestricted=true)].
How can you work with permissions from your .NET application?
You can request permission to do something and you can demand certain permissions
from other apps. You can also refuse permissions so that your app is not inadvertently
used to destroy some data.
Code security is the approach of using permissions and permission sets for a given code
to run. The admin, for example, can disable running executables off the Internet or
restrict access to corporate database to only few applications. Role-based security most of
the time involves the code running with the privileges of the current user. […]
Displaying a drop-down list requires a template column in the grid. Typically, the
ItemTemplate contains a control such as a data-bound Label control to show the current
value of a field in the record. You then add a drop-down list to the EditItemTemplate. In
Visual Studio, you can add a template column in the Property […]
Using pagination option in DataGrid control. We have to set the number of records for a
page, then it takes care of pagination by itself.
Client side validation is done by default. Server side validation is also possible. We can
switch off the client side and server side can be done.
We can Validate the controls in an ASP.NET page by using special validation controls
that are meant for this. We have Range Validator, Email Validator.
A language should comply with the Common Language Runtime standard to become
a .NET language. In .NET, code is compiled to Microsoft Intermediate Language (MSIL
for short). This is called as Managed Code. This Managed code is run in .NET
environment. So after compilation to this IL the language is not a barrier. A code […]
Sun left the implementation of a specific garbage collector up to the JRE developer, so
their performance varies widely, depending on whose JRE you’re using. Microsoft
standardized on their garbage collection.
The CLI (Common Language Infrastructure) is the definiton of the fundamentals of the
.NET framework - the Common Type System (CTS), metadata, the Virtual Execution
Environment (VES) and its use of intermediate language (IL), and the support of multiple
programming languages via the Common Language Specification (CLS). The CLI is
documented through ECMA
The CLR (Common […]
Yes, via machine.config and application level .config file (or web.config in ASP.NET).
Application-level XML settings take precedence over machine.config.
(No
Use caspol. If you are the machine administrator, you can operate at the ‘machine’ level -
which means not only that the changes you make become the default for the machine, but
also that users cannot change the permissions to be more permissive. If you are a normal
(non-admin) user you can still modify the permissions, but only to make them more
restrictive.
For example, to allow intranet code to do what it likes you might do this: caspol -cg 1.2
FullTrust
Note that because this is more permissive than the default policy (on a standard system),
you should only do this at the machine level - doing it at the user level will have no
effect.
t Interview Questions
How to set the debug mode?
By koolkampus ⋅ April 14, 2006 ⋅ Email this post ⋅ Print this post ⋅ Post a comment
⋅ Add to Technorati Favorites
(No Rating
One of the key features of the ADO.NET DataSet is that it can be a self-contained and
disconnected data store. It can contain the schema and data from several rowsets in
DataTable objects as well as information about how to relate the DataTable objects-all in
memory. The DataSet neither knows nor cares where the data came from, nor does it
need a link to an underlying data source. Because it is data source agnostic you can pass
the DataSet around networks or even serialize it to XML and pass it across the Internet
without losing any of its features. However, in a disconnected model, concurrency
obviously becomes a much bigger problem than it is in a connected model.
In this column, I’ll explore how ADO.NET is equipped to detect and handle concurrency
violations. I’ll begin by discussing scenarios in which concurrency violations can occur
using the ADO.NET disconnected model. Then I will walk through an ASP.NET
application that handles concurrency violations by giving the user the choice to overwrite
the changes or to refresh the out-of-sync data and begin editing again. Because part of
managing an optimistic concurrency model can involve keeping a timestamp
(rowversion) or another type of flag that indicates when a row was last updated, I will
show how to implement this type of flag and how to maintain its value after each
database update.
Can we handle the error and redirect to some pages
using web.config?
By koolkampus ⋅ April 14, 2006 ⋅ Email this post ⋅ Print this post ⋅ Post a comment
⋅ Add to Technorati Favorites
Yes, we can do this, but to handle errors, we must know the error codes; only then we can
take the user to a proper error message page, else it may confuse the user.
CustomErrors Configuration section in web.config file:
The default configuration is:
< customErrors mode="RemoteOnly" defaultRedirect="Customerror.aspx" >
< error statusCode="404" redirect="Notfound.aspx" / >
< /customErrors >
If mode is set to Off, custom error messages will be disabled. Users will receive detailed
exception error messages.
If mode is set to On, custom error messages will be enabled.
If mode is set to RemoteOnly, then users will receive custom errors, but users accessing
the site locally will receive detailed error messages.
Add an < error > tag for each error you want to handle. The error tag will redirect the
user to the Notfound.aspx page when the site returns the 404 (Page not found) error.
[Example]
There is a page MainForm.aspx
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles MyBase.Load
‘Put user code to initialize the page here
Dim str As System.Text.StringBuilder
str.Append(”hi”) ‘ Error Line as str is not instantiated
Response.Write(str.ToString)
End Sub
[Web.Config]
< customErrors mode="On" defaultRedirect="Error.aspx"/ >
‘ a simple redirect will take the user to Error.aspx [user defined] error file.
< customErrors mode="RemoteOnly" defaultRedirect="Customerror.aspx" >
< error statusCode="404" redirect="Notfound.aspx" / >
< /customErrors >
‘This will take the user to NotFound.aspx defined in IIS.
ViewState is the mechanism ASP.NET uses to keep track of server control state values
that don’t otherwise post back as part of the HTTP form. ViewState Maintains the UI
State of a Page
ViewState is base64-encoded. It is not encrypted but it can be encrypted by setting
EnableViewStatMAC=”true” & setting the machineKey validation type to […]
On Windows 2003 (IIS 6.0) running in native mode, the component is running within the
w3wp.exe process associated with the application pool which has been configured for the
web application containing the component.
On Windows 2003 in IIS 5.0 emulation mode, 2000, or XP, it’s running within the IIS
helper process whose name I do not […]
“ASP (Active Server Pages) and ASP.NET are both server side technologies for building
web sites and web applications, ASP.NET is Managed compiled code - asp is interpreted.
and ASP.net is fully Object oriented. ASP.NET has been entirely re-architected to
provide a highly productive programming experience based on the .NET Framework, and
a robust infrastructure for […]
When a form is submitted in classic ASP, all form values are cleared. Suppose you have
submitted a form with a lot of information and the server comes back with an error. You
will have to go back to the form and correct the information. You click the back button,
and what happens…….ALL […]
An entity is a specific character string that has the effect of causing a formatting program
to select and present a particular character or notation.
Dock Property->Gets or sets which edge of the parent container a control is docked to. A
control can be docked to one edge of its parent container or can be docked to all edges
and fill the parent container. For example, if you set this property to DockStyle.Left, the
left edge of thecontrol will be […]
Web deployment: the user always downloads the latest version of the code, the program
runs within security sandbox, properly written app will not require additional security
privileges.
Isn’t it just a Bitmap with a wrapper name around it? No, Icon lives in System.Drawing
namespace. It’s not a Bitmap by default, and is treated separately by .NET. However, you
can use ToBitmap method to get a valid Bitmap object from a valid Icon object.
A pixel is the lowest-resolution dot the computer monitor supports. Its size depends on user’s
settings and monitor size. A point is always 1/72 of an inch. An em is the number of
pixels that it takes to display the letter M.
UDDI repositaries like uddi.microsoft.com, IBM UDDI node, UDDI Registries in Google
Directory, enthusiast sites like XMethods.net.
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 […]
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, thisproperty instructs the client application not to save the Cookie on the
user’s hard disk when a session ends.
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 […]
Client-activated objects are objects whose lifetimes are controlled by the calling
application domain, just as they would be if the object were local to the client. With client
activation, a round trip to the server occurs when the client tries to create an instance of
the server object, and the client proxy is created using […]
.NET components are accessed from COM via a COM Callable Wrapper (CCW). This is
similar to a RCW, but works in the opposite direction. Again, if the wrapper cannot be
automatically generated by the .NET development tools, or if the automatic behaviour is
not desirable, a custom CCW can be developed. Also, for COM to […]
Dock Property->Gets or sets which edge of the parent container a control is docked to. A
control can be docked to one edge of its parent container or can be docked to all edges
and fill the parent container. For example, if you set this property to DockStyle.Left, the
left edge of thecontrol will be docked to the left edge of its parent control. Additionally,
the docked edge of the control is resized to match that of its container
control.
Anchor Property->Gets or sets which edges of the control are anchored to the edges of
its container. A control can be anchored to one or more edges of its parent container.
Anchoring a control to its parent ensures that the anchored edges remain in the same
position relative to the edges of the parent container when the parent container is resized.
Client-activated objects are objects whose lifetimes are controlled by the calling application
domain, just as they would be if the object were local to the client. With client activation,
a round trip to the server occurs when the client tries to create an instance of the server
object, and the client proxy is created using an object reference (ObjRef) obtained on
return from the creation of the remote object on the server. Each time a client creates an
instance of a client-activated type, that instance will service only that particular reference
in that particular client until its lease expires and its memory is recycled. If a calling
application domain creates two new instances of the remote type, each of the client
references will invoke only the particular instance in the server application domain from
which the reference was returned.
In COM, clients hold an object in memory by holding a reference to it. When the last
client releases its last reference, the object can delete itself. Client activation provides the
same client control over the server object’s lifetime, but without the complexity of
maintaining references or the constant pinging to confirm the continued existence of the
server or client. Instead, client-activated objects use lifetime leases to determine how long
they should continue to exist. When a client creates a remote object, it can specify a
default length of time that the object should exist. If the remote object reaches its default
lifetime limit, it contacts the client to ask whether it should continue to exist, and if so,
for how much longer. If the client is not currently available, a default time is also
specified for how long the server object should wait while trying to contact the client
before marking itself for garbage collection. The client might even request an indefinite
default lifetime, effectively preventing the remote object from ever being recycled until
the server application domain is torn down. The difference between this and a server-
activated indefinite lifetime is that an indefinite server-activated object will serve all
client requests for that type, whereas the client-activated instances serve only the client
and the reference that was responsible for their creation. For more information, see
Lifetime Leases.
To create an instance of a client-activated type, clients either configure their application
programmatically (or using a configuration file) and call new (New in Visual Basic), or they
pass the remote object’s configuration in a call to Activator.CreateInstance. The
following code example shows such a call, assuming a TcpChannel has been registered to
listen on port 8080.
What is Runtime Callable wrapper?.when it will created?.
The common language runtime exposes COM objects through a proxy called the runtime
callable wrapper (RCW). Although the RCW appears to be an ordinary object to .NET
clients, its primary function is to marshal calls between a .NET client and a COM object.
This wrapper turns the COM interfaces exposed by the COM component into […]
WindowsDefaultLocation tells the form to start up at a location selected by OS, but with
internally specified size. WindowsDefaultBounds delegates both size and starting
position choices to the OS.
Web deployment: the user always downloads the latest version of the code, the program
runs within security sandbox, properly written app will not require additional security
privileges.
It’s a fake copy of the server object that resides on the client side and behaves as if it was
the server. It handles the� communication between real server object and the client
object. This process is also known as marshaling.
When would you use .NET Remoting and when Web services?
Use remoting for more efficient exchange of information when you control both ends of
the application. Use Web services for� � � � open-protocol-based information
exchange when you are just a client or a server with the other end belonging to someone
else.
Channels represent the objects that transfer the other serialized objects from one
application domain to another and from� one computer to another, as well as one
process to another on the same box. A channel must exist before an object can be
transferred.
Security should be taken care of at the application level. Cryptography and other security
techniques can be applied� at application or server level.
Most usually Remoting;.NET remoting enables client applications to use objects in other
processes on the same computer or on any other computer available on its network.While
you could implement an out-of-proc component in any number of other ways, someone
using the term almost always means Remoting.
Yes, but what’s the point, since it will call Finalize(), and Finalize() has no guarantees
when the memory will be cleaned up,� plus, it introduces additional load on the garbage
collector.
Document Type Definition (DTD) describes a model or set of rules for an XML
document. XML Schema Definition (XSD) also describes the structure of an XML document
but XSDs are much more powerful. The disadvantage with the Document Type
Definition is it doesn’t support data types beyond the basic 10 primitive types. It cannot
properly […]
Why is the XML InfoSet specification different from the Xml DOM?
What does the InfoSet attempt to solve?
“The XML Information Set (Infoset) defines a data model for XML. The Infoset
describes the abstract representation of an XML Document. Infoset is the generalized
representation of the XML Document, which is primarily meant to act as a set of
definitions used by XML technologies to formally describe what parts of an XML
document they […]
Just-In-Time compiler- it converts the language that you write in .Net into machine
language that a computer can understand. there are tqo types of JITs one� is memory
optimized & other� is performace optimized.
What is MSIL?
When compiling to managed code, the compiler translates your source code into Microsoft
intermediate language (MSIL), which is a CPU-independent set of instructions that can
be efficiently converted to native code. MSIL includes instructions for loading, storing,
initializing, and calling methods on objects, as well as instructions for arithmetic and
logical operations, control flow, direct […]
Document Type Definition (DTD) describes a model or set of rules for an XML
document. XML Schema Definition (XSD) also describes the structure of an XML
document but XSDs are much more powerful. The disadvantage with the Document Type
Definition is it doesn’t support data types beyond the basic 10 primitive types. It cannot
properly define the type of data contained by the tag. An Xml Schema provides an Object
Oriented approach to defining the format of an xml document. The Xml schema support
most basic programming types like integer, byte, string, float etc., We can also define
complex types of our own which can be used to define a xml document. Xml Schemas
are always preferred over DTDs as a document can be more precisely defined using the
XML Schemas because of its rich support for data representation.
Why is the XML InfoSet specification different from the
Xml DOM? What does the InfoSet attempt to solve?
By koolkampus ⋅ March 14, 2006 ⋅ Email this post ⋅ Print this post ⋅ Post a
comment ⋅ Add to Technorati Favorites
“The XML Information Set (Infoset) defines a data model for XML. The Infoset
describes the abstract representation of an XML Document. Infoset is the generalized
representation of the XML Document, which is primarily meant to act as a set of
definitions used by XML technologies to formally describe what parts of an XML
document they operate upon.
The Document Object Model (DOM) is one technology for representing an XML
Document in memory and to programmatically read, modify and manipulate a xml
document.� Infoset helps defining generalized standards on how to use XML that is not
dependent or tied to a particular XML specification or API. The Infoset tells us what part
of XML Document should be considered as significant information.
You can initialize readonly variables to some runtime values. Let’s say your program
uses current date and time as one of the values that won’t change. This way you declare
public readonly string DateT = new DateTime().ToString().
It’s a delegate that points to and eventually fires off several methods.
Value Type: Value types are allocated on the stack just like primitive types in VBScript,
VB6 and C/C++. Value types are not instantiated using new go out of scope when the
function they are defined within returns.
Value types in the CLR are defined as types that derive from system.valueType.
A data type that fully describes a value by specifying the sequence of bits that constitutes
the value’s representation. Type information for a value type instance is not stored with
the instance at run time, but it is available in metadata. Value type instances can be
treated as objects using boxing.
The struct type is suitable for representing lightweight objects such as Point, Rectangle,
and Color. Although it is possible to represent a point as a class, a struct is more efficient
in some scenarios. For example, if you declare an array of 1000 Point objects, you will
allocate additional memory for referencing each object. In […]
Reference Type: Reference types are allocated on the managed CLR heap, just like object
types. A data type that is stored as a reference to the value’s location. The value of a
reference type is the location of the sequence of bits that represent the type’s data.
Reference types can be self-describing types, pointer types, […]
� Managed Code: Code that runs under a “contract of cooperation” with the common
language runtime. Managed code must supply the metadata necessary for the runtime to
provide services such as memory management, cross-language integration, code access
security, and automatic lifetime control of objects. All code based on Microsoft
intermediate language (MSIL) executes as managed […]
There is currently no simple way to stop code being reverse-engineered from IL. In future
it is likely that IL obfuscation tools will become available, either from MS or from third
parties. These tools work by ‘optimising’ the IL in such a way that reverse-engineering
becomes much more difficult. Of course if you are writing […]
There are at least two types of .NET attribute. The first type I will refer to as a metadata
attribute - it allows some data to be attached to a class or method. This data becomes part
of the metadata for the class, and (like other class metadata) can be accessed via
reflection. The other […]
What is serialization?
It’s certainly an issue that affects component design. If you have objects that maintain
expensive or scarce resources (e.g. database locks), you need to provide some way for the
client to tell the object to release the resource when it is done. Microsoft recommend that
you provide a method called Dispose() for this purpose. However, […]
Because of the garbage collection algorithm. The .NET garbage collector works by
periodically running through a list of all the objects that are currently being referenced by
an application. All the objects that it doesn’t find during this search are ready to be
destroyed and the memory reclaimed. The implication of this algorithm is that […]
Can two application one using private assembly and other using Shared assembly be
stated as a side-by-side executables? Side-by-side execution is the ability to run multiple
versions of an application or component on the same computer. You can have multiple
versions of the common language runtime, and multiple versions of applications and
components that use […]
Unboxing is the process of converting a Reference type variable to Value type and thus
allocating memory on the stack . It happens only to those Reference type variables that
have been earlier created by Boxing of a Value Type , therefore internally they contain a
value type , which can be obtained through explicit […]
Yes. XmlSerializer supports a range of attributes that can be used to configure serialization
for a particular class. For example, a field or property can be marked with the
[XmlIgnore] attribute to exclude it from serialization. Another example is the
[XmlElement]
attribute, which can be used to specify the XML element name to be used for a particular
property or field.
Serialization via SoapFormatter/BinaryFormatter can also be controlled to some extent by
attributes. For example, the [NonSerialized] attribute is the equivalent of XmlSerializer’s
[XmlIgnore] attribute. Ultimate control of the serialization process can be acheived by
implementing the the ISerializable interface on the class whose instances are to be
serialized.
Interview Questions
Is the lack of deterministic destruction in .NET a
problem?
By koolkampus ⋅ March 14, 2006 ⋅ Email this post ⋅ Print this post ⋅ Post a
comment ⋅ Add to Technorati Favorites
It’s certainly an issue that affects component design. If you have objects that maintain
expensive or scarce resources (e.g. database locks), you need to provide some way for the
client to tell the object to release the resource when it is done. Microsoft recommend that
you provide a method called Dispose() for this purpose. However, this causes problems
for distributed objects - in a distributed system who calls the Dispose() method? Some
form of reference-counting or ownership-management mechanism is needed to handle
distributed objects - unfortunately the runtime offers no help with this.
view Questions
What is side-by-side execution?
By koolkampus ⋅ March 14, 2006 ⋅ Email this post ⋅ Print this post ⋅ Post a
comment ⋅ Add to Technorati Favorites
Can two application one using private assembly and other using Shared assembly be
stated as a side-by-side executables? Side-by-side execution is the ability to run multiple
versions of an application or component on the same computer. You can have multiple
versions of the common language runtime, and multiple versions of applications and
components that use a version of the runtime, on the same computer at the same time.
Since versioning is only applied to shared assemblies, and not to private assemblies, two
application one using private assembly and one using shared assembly cannot be stated as
side-by-side
executables.
Internal keyword is one of the access specifier available in .Net framework , that makes a
type visible in a� given assembly , for e.g : a single dll can contain multiple modules ,
essentially a multi file assembly , but it forms a single binary component , so any type
with internal keyword […]
These all are access modifier and they governs the access level. They can be applied to
class, methods, fields.
Public: Allows class, methods, fields to be accessible from anywhere i.e. within and
outside an assembly.
Private: When applied to field and method allows to be accessible within a class.
Protected: Similar to private but can be accessed by […]
This three alongwith name of the assembly provide a strong name or fully qualified name
to the assembly. When a assebly is referenced with all three.
PublicKeyToken: Each assembly can have a public key embedded in its manifest that
identifies the developer. This ensures that once the assembly ships, no one can modify the
code or […]
Before the .NET Framework existed, Windows had two levels of trust for downloaded
code. This old model was a binary trust model. You only had two choices: Full Trust, and
No Trust. The code could either do anything you could do, or it wouldn’t run at all.
The permission sets in .NET include FullTrust, SkipVerification, Execution, […]
What are PDBs? Where must they be located for debugging to work?
A program database (PDB) files holds debugging and project state information that allows
incremental linking of debug configuration of your program.There are several different
types of symbolic debugging information. The default type for Microsoft compiler is the
so-called PDB file. The compiler setting for creating this file is /Zi, or /ZI for C/C++(which
creates a […]
The using() pattern is useful because it ensures that Dispose() will always be called when
a disposable object (defined as one that implements IDisposable, and thus the Dispose()
method) goes out of scope, even if it does so by an exception being thrown, and thus that
resources are always released.
Dispose() is called by the user of an object to indicate that he is finished with it, enabling
that object to release any unmanaged resources it holds. Finalize() is called by the run-
time to allow an object which has not had Dispose() called on it to do the same. However
Dispose() operates determinalistically, whereas there is […]
The hugely simplistic version is that every time it garbage-collects, it starts by assuming
everything to be garbage, then goes through and builds a list of everything reachable.
Those become not-garbage, everything else doesn’t, and gets thrown away. What makes
it generational is that every time an object goes through this process and survives, it […]
The PID (Process ID) a unique number for each item on the Process
Tab, Image Name list. How do you get the PID to appear?
In Task Manger, select the View menu, then select columns and check PID (Process
Identifier).In Linux, PID is used to debug a process explicitly. However we cannot do
this in a windows environment.
Microsoft has launched a SDK called as Microsoft Operations Management (MOM).
This uses the PID to find out which dll’s have been loaded […]
PID is the process Id of the application in Windows. Whenever a process starts running in
the Windows environment, it is associated with an individual process Id or PID.
Both are same. System.Int32 is a .NET class. Int is an alias name for System.Int32.
Yes. If a class that is to be serialized contains references to objects of other classes, and if
those classes have been marked as serializable, then their objects are serialized too.
Schemas can be included inside of XML file is called Inline Schemas.This is useful�
when it is inconvenient to physically seprate the schema and the XML document.A�
schema is an XML document that defines the structure, constraints, data types, and�
relationships of the elements that constitute the data contained inside the XML� […]
This three alongwith name of the assembly provide a strong name or fully qualified name
to the assembly. When a assebly is referenced with all three.
PublicKeyToken: Each assembly can have a public key embedded in its manifest that
identifies the developer. This ensures that once the assembly ships, no one can modify the
code or other resources contained in the assembly.
Before the .NET Framework existed, Windows had two levels of trust for downloaded
code. This old model was a binary trust model. You only had two choices: Full Trust, and
No Trust. The code could either do anything you could do, or it wouldn’t run at all.
GAC assemblies are granted FullTrust. In v1.0 and 1.1, the fact that assemblies in the
GAC seem to always get a FullTrust grant is actually a side effect of the fact that the
GAC lives on the local machine.� If anyone were to lock down the security policy by
changing the grant set of the local machine to something less than FullTrust, and if your
assembly did not get extra permission from some other code group, it would no longer
have FullTrust even though it lives in the GAC.