MCSD .NETMCAD .NETMCDBA 70-306 Short Notes &Tips

Creating User Services

  • The identity object that implements the IIdentity interface, is used during the authentication process, when a user’s identity is verified. It contains information about a user who is being validated, such as username and password.
  • The principal object that implements the IPrincipal interface, is used during the authentication process when the application determines the data that can be accessed by a user and the code to be executed. It contains information about a user’s identity, such as username and password, as well as information about a user’s role, such as manager or associate.
  • Setting the MinimizeBox property of a Windows form to false prevents the minimize button from being displayed in the caption bar of the form.
  • Setting the MaximizeBox property of a Windows form to false prevents the maximize button from being displayed in the caption bar of the form.
  • Setting the FormBorderStyle property of a Windows form to one of the Fixed styles prevents the form from being resized.
  • The AllowDrop property of a control is used to get or set a boolean value, which indicates whether or not the control can be used to accept data from other controls.
  • The correct sequence of the classes of System.Windows.Forms namespace in descending order is:
    1. Control
    2. ScrollableControl
    3. ContainerControl
    4. Forms
  • The WindowState property of the Form class is used to get or set the state of the Form window in a maximized, minimized or normal state.
  • The Option Strict statement imposes a restriction on implicit data type conversions to only be widening conversions. It disallows conversions between numeric types and strings.
  • An interface is a reference type that defines a contract. An interface body consists of method declarations and constants.
  • A base form can be designed with all the elements that are common in multiple forms. After using visual inheritance, the base form can be used as a template for all other forms.
  • Visual inheritance is a feature that allows the creation of a new form from an existing form.
  • In order to use the Inheritance Picker dialog box to create an inherited form, the project that contains the base form must be built into an executable file or DLL.
  • Stateless objects do not hold private state accumulated from the execution of one or more client calls. They are generally created to allow the pooling of components for scalability purposes.
  • An ActiveX control must be registered on the development computer before being used in a Windows-based application. Once the control is registered, it can be added to the Toolbox using the Customize Toolbox dialog box, and then added to a Windows form.
  • The following steps should be taken to dynamically add a control to a Windows form and make it visible:
    1. Create an object of the control.
    2. Set the Visible property of the control to true.
    3. Add the object to the Controls collection of the form.
  • The AccessibleName property of the Control class is used to get or set the accessible name of a control, which is reported to the accessibility aids. It contains a string value used by clients to identify, find, or announce a control for users.
  • The Anchor property of a control is used to define a consistent position of the control in its parent container. A control can be anchored to one or more edges of its container.
  • The AddRange method of the Control.ControlCollection class is used to add an array of controls to a collection. It is also used to add a single control to a collection.
  • When the Dock property of a control is set to Left, the left edge of the control is docked to the left edge of its container i.e. a Windows form.
  • The HelpProvider control is used to associate HTML help with a Windows application. It is used to provide context-sensitive help for controls on Windows forms, dialog boxes, or controls on dialog boxes.
  • The top-level menu items can have the same access keys. If the same key is defined as an access key for more than one menu item, the user has to hold down the ALT key and the access key to move from one menu option to another.
  • The following are the advantages of early binding:
    1. Objects are created faster.
    2. Information about properties and methods of the object is available in design environment.
  • The DisappearAfter property of the Menu class is used to get or set the duration for which a dynamic menu will be displayed when the mouse cursor is removed from the menu.
  • The CloneMenu method of the MenuItem class can be used to create copies of the specified menuitems.
  • The SetToolTip method of the ToolTip component is used to set the ToolTip property of a control on a form.
  • Context menus or pop-up menus are shortcut menus that appear only when a user clicks the right mouse button over a control or a form. They are built using the ContextMenu class.
  • The TabStop property of a control indicates whether the control will receive focus as the user tabs through a window by using the TAB key.
  • The Text property of the MenuItem class specifies the text to be displayed as the caption for a menu item.
  • The Class property of the SqlException class returns the severity level of errors that are returned from the SQL Server .NET data provider.
  • The BindToDataAndErrors method of a ErrorProvider control is used to set the DataSource and DataMember properties at runtime.
  • If the CausesValidation property of a TextBox control is set to False, the Validating and Validated events are suppressed.
  • The MaxLength property of a TextBox control is used to specify the maximum number of characters that can be entered into the text box control.
  • The throw statement creates an exception within a procedure and explicitly throws the exception.
  • If the Resume Next statement is executed in the error-handling routine of a procedure, execution returns to the statement after the call to another procedure.
  • The GetHelpString method of the HelpProvider class is used to get the contents of the pop-up Help window for a specified control.
  • The SetHelpString method of the HelpProvider control is used to associate a specific HTML Help string with a control.
  • The SetShowHelp method of the HelpProvider control is used to specify whether or not help is displayed for a control.
  • When the HelpProvider control is added to a Windows form, the HelpString, HelpNavigator, and HelpKeyword properties are also added to the form.
  • The Active property of a ToolTip control determines whether the ToolTip control is currently active or not.
  • The ToolTip control can be added to a form by using the Toolbox pane. The ToolTip component is a non-visual control. When it is added to a form, it appears in the component tray that is below the form.
  • The ToString method of the Exception object provides the maximum information about the exception.
  • Setting the anchor property of the button to upper-right value will position the button relative to a Windows form. Whenever the form is resized, the button will position itself to the upper-right edge of the form.
  • When an array in Visual Basic .NET is declared, only the upper bound of the array is defined.
  • A namespace allows developers to organize and uniquely qualifies element names and relationships defined in an assembly.
  • The Imports statement is used to import namespace names from referenced projects and assemblies.
  • The ExecuteXmlReader method of the DataSet class builds the XmlReader object.
  • LostFocus is an event of the Control class and occurs when a control loses input focus.
  • The AppendChild method of the XmlAttribute class is used to add a specified node to the end of the list of child nodes of the current node.
  • InferSchema is an XmlReadMode value that is used to ignore an inline schema, infer schema from data, and load the data. If a DataSet object already contains a schema, the schema is extended by adding new tables or columns to the tables.
  • The SqlDataAdapter class represents a set of data commands and a database connection that are used to fill a DataSet and update a SQL Server database.
  • The SqlCommand class represents a transact-SQL statement or stored procedure to be executed at a SQL Server database. The SqlConnection class represents an open connection to a SQL Server database.
  • The ReadXml method of the DataSet class reads XML schema and data into a DataSet.
  • In a SingleCall object, a new object is created whenever a message arrives. The new object then processes the message and returns an optional reply. Finally, the object created is discarded.
  • For Marshal By Reference objects, a reference to an object is made when it is passed from one application to another.
  • A Web service client can be any component or application that references and uses a Web service. It can be a client-based application or a Web application.
  • The WaitAny method waits for the first Web service to return a result before allowing the method to continue processing.
  • SOAP is an XML-based protocol and defines rules for data encoding.
  • The SoapUnknownHeader class is used to handle data received from a SOAP header but not understood by any recipient Web service.
  • While defining and processing SOAP headers, a class representing data in a particular SOAP header needs to be defined. The class must be derived from the SoapHeader class.
  • The types section of the WSDL file defines data types and data structures used by a Web service.
  • The TextMode property of the TextBox control is used to get or set the mode of a TextBox control to single-line, multiline or password.
  • A Web Service is built of the following four different parts:
    1. The processing directive
    2. The namespace
    3. The public class
    4. The Web-callable methods
  • The EnableSession property of the WebMethodAttribute class is used to enable session state for an XML Web service method.
  • The IsCallerInRole method of the ContextUtil class determines whether the client is having the specific role or not.
  • The MemberName property of the SoapHeaderAttribute class specifies the member of the XML Web service that represents the SOAP header contents.
  • In Visual Basic .NET, the Sub New procedure is used as a constructor for a class.
  • To localize a form, the Localizable property of the Form class must be set to True and the Language property of the Form class must be set to the language in which the form is developed.
  • The Checked property of the MenuItem class is used to check a menu item the corresponding toolbar will become visible.
  • The System.ComponentModel.CancelEventArgs class provides data for a cancelable event. The Cancel property of the CancelEventArgs class specifies whether or not an event of an object should be canceled.
  • The Load event of the Form class occurs when a Windows form is displayed for the first time. This event is used to perform tasks, such as allocation of resources, initialization of variables, etc.
  • The MinimumSize property of the Form class is used to get or set the minimum size up to which a form can be resized.
  • The Size property of the Form class is used to get or set the size of a form.
  • The ControlAdded event of the Control class occurs when a new control is added to the Control.ControlCollection class.
  • The Margin property of the Button class can be used to get or set the space between controls.
  • When users press the ESC key, the CancelButton property of a Windows form must be set to the name of a button.
  • The Leave event of a TextBox control occurs when the input focus leaves the control.
  • The events of the Control class occur in the following order:
    1. Enter
    2. GotFocus
    3. Leave
    4. Validating
    5. Validated
    6. LostFocus
  • The Fill value of the Dock property of the Command Button control allows the developer to always keep the docked Command Button control to completely fill the containing control, i.e., a Windows form. If the form is resized at either runtime or design-time, the Command Button control will also be resized so that it continues to fill the containing control, i.e., the form.
  • The Validating event occurs when a control is performing validation. It can be used to prevent the control focus from moving away from a specific control until a suitable value has been entered.
  • The Select event occurs when a user places the mouse cursor over a menu item. This event also occurs when a user highlights a menu item by scrolling to the menu item by using the arrow keys on the keyboard. This event is not raised for parent menu items.
  • The PrintPreviewControl displays a PrintDocument exactly as it would appear on printing. This control does not provide any button or other user interface elements.
  • The PrintPage event of the PrintDocument class occurs when a page is printed.
  • The HasMorePages property of the PrintPageEventArgs class specifies whether or not to print an additional page.
  • The PageSettings property of the PrintPageEventArgs class is used to get the page settings of the current page.
  • The PrintDialog control is a graphical interface that allows a user to select a printer and specifies other print settings for an associated PrintDocument object. It is a non-visual control.
  • The AllowSelection property of a PrintDialog control returns a value to indicate whether or not the Selection option button is enabled when the Print dialog box is displayed.
  • The AllowSomePages property of a PrintDialog control returns a value to indicate whether the Pages option button is enabled or disabled when the Print dialog box is displayed.
  • The ChildKeyConstraint property of the DataRelation class is used to get the ForeignKeyConstraint for the relation established between two tables.
  • The Clone method copies the structure of a DataSet, but does not copy the data. It includes Datatable, schemas, relations, and constraints.

Creating and Managing Components and .NET Assemblies

  • The Timeout property of the HttpSessionState class sets the amount of time that needs to elapse, before the session state provider terminates the session.
  • In order to deploy an assembly into the global assembly cache, the assembly must be given a strong name and registered within the GAC using Gacutil.exe.
  • The Publisher policy configuration file contains compatibility information issued by the publisher of a shared component. It ensures that the latest version of the shared component is used by all applications using the component.
  • The Global Assembly Cache (Gacutil.exe) tool is used to view and manipulate the contents of the global assembly cache. It allows developers to install or remove assemblies from the cache, and to display the contents of the cache.
  • Microsoft Management Console (MMC) is a Windows utility designed to manage servers and services through a common user interface. It provides a common environment for hosting administrative tools called consoles.
  • Assembly Linker (Al.exe) is a tool used to generate a file with an assembly manifest from one or more files. These files are either resource files or modules.
  • The assemblies that contain culture-neutral resources are referred to as satellite assemblies. These assemblies are used to deploy language-specific resources for an application. They do not contain any executable code but contain only such resources that are culture-neutral.
  • Publisher policy files contain compatibility information issued by the publisher of a shared component. These files ensure that the latest version of the shared component is used by all applications using the component.
  • The Caspol.exe tool can be used to examine and modify Machine-level, User-level, and Enterprise-level code access security policies
  • The TypeLoadException exception is thrown when the common language runtime (CLR) is unable to find an assembly or the type within the assembly, or cannot load the type.
  • Web applications that generate contents at runtime use satellite assemblies. They use satellite assemblies for storing translated string and other aspects of an application’s user interface that are culture-dependent.
  • The Inherits keyword can be used to define inheritance of one form from another form. The following code statement can be defined in the inherited form:
    Inherits solution_name.form_name
    where, solution_name is the name of the solution in which the form is placed, and form_name is the name of the form that is to be inherited.
  • The MyBase keyword refers to the base class of the current instance of a class. It is also used to refer to methods and properties of a class from which the current instance is inherited.
  • The RemoveAt method of the List class is used to delete a selected item from the List control.
  • The Capture property of the ComboBox class is used to get or set a value that indicates whether or not a control has captured the mouse.

Consuming and Manipulating Data

  • An attribute name must begin with a letter or an underscore. A string value assigned to an attribute is delimited using either single quotes or double quotes.
  • The CommandText property of the SqlCommand class is used to get or set a SQL statement, table name, or stored procedure for execution at the data source.
  • The Open method of the SqlConnection Class is used to open the connection to a database so that an application is able to retrieve data from the database.
  • The GetSchema method of the SqlConnection Class is used to retrieve schema information about the data source.
  • The SqlParameter class represents a parameter to a SqlCommand object. The SqlParameter constructor accepts two parameters, the parameter name and its datatype.
  • The DataSet and DataRelation objects are used to create a relationship between databases. The relationship exists only within the context of the DataSet object.
  • The OLE DB .NET data provider is used by applications to connect to a SQL Server 6.5 database or its earlier versions. It can be used to create a connection with any data source that can be accessed through ODBC.
  • The Dataset1.Tables(“”Table1″”).Rows(2).Item(“”Name””) statement will retrieve data from the third record of the Name field in Table1.
  • In the MySqlReader.Item(“”Name””) statement, data is retrieved from a field named Name. The Item property of the SqlDataReader class returns the value of a column or a field in a specified table. The ordinal number of a field can also be used instead of field name.
  • The OdbcConnection class can be used to connect to a database by using the DSN (Data Source Name).
  • The Database property of the OleDbConnection class is used to get the name of the current database.
  • The RowFilter property of the DataView class is used to get or set the expression to filter the rows to be viewed in a DataView object.
  • When the Serializable value of the IsolationLevel enumeration is specified, it prevents more than one user from updating the dataset until the transaction is complete.
  • The Expression property of the DataColumn class is used to create an aggregate column. It is used to calculate values in a column or filter records.
  • The AllowNew property of the DataView class is used to add new rows in a control such as the DataView control.
  • The Delete method of the DataView class is used to delete a row at a specified index.
  • The AcceptChanges method of the DataSetclass is used to commit all the changes made to the DataSet since the time the method was previously called.
  • The SqlDataReader object is used to store the return results from a procedure call.
  • The ExecuteScalar method of the SqlCommand class is used to execute a query. It retrieves the first column of the first row in a result set.
  • The SqlCommand class represents a stored procedure or a SQL statement to execute at a SQL Server database.
  • The CommandType property of the SqlCommand class specifies how the command string is interpreted.
  • The Precision property is used to get or set the maximum number of digits that are used to represent the Value property.
  • Setting the SET ROWCOUNT command in a Transact-SQL statement will cause the query to stop processing when a certain number of rows are to be retrieved and when data modification statements such as INSERT, UPDATE, and DELETE are written in an application.
  • The ExecuteNonQuery method of the SqlCommand class is used to execute commands that change a database. These commands include the Transact-SQL INSERT, UPDATE, DELETE, and SET statements.
  • The first row of a table can be deleted either by using the Delete method of the DataRow object or by invoking the Remove method of the Rows collection. After deleting the row, the Update method of the DataAdapter class is used to apply the changes been made to the database.
  • The OleDbDataAdapter class is used to represent a database connection and a set of data commands that are used to fill the DataSet and update the data source. It is used as a bridge between a DataSet and data source to save and retrieve data.
  • The SqlDataReader class avoids creating unnecessary objects or making unnecessary copies of data. Hence, it provides optimal performance.
  • The LoadDataRow method of the DataTable class finds the matching value and updates a specific row in the primary column of a specific table. If the value does not match, a new row is created.
  • The DataBindings property of the TextBox control is used to bind the control with the data source.
  • The DataRelation class represents a parent/child relationship between two DataTable objects. Before creating a relationship, it verifies relationship between the matching columns in the parent and child tables.
  • The following are the appropriate conditions on the basis of which the referential integrity rules are applied:
    1. When changes such as edit or deletion are made in the Customer table records.
    2. When changes made in the Customer table are either accepted or rejected.
    3. When new records are added to a Customer table.
  • The LIKE operator is used to determine whether or not a given string matches the specified pattern. It can be used in a search condition to search for patterns. Wildcard characters can be used with the LIKE operator to substitute one or more characters in a search string.
  • A stored procedure is a group of Transact-SQL statements compiled into a single execution plan. It can be used to implement business logic or as a security mechanism, but it is not executed automatically.
  • The Merge method of the DataSet class is used to incorporate the latest changes from a data source into an existing DataSet object.
  • The GetXml method of the DataSet class returns the XML representation of data from a DataSet.
  • The Fill method of the DataAdapter class returns the number of rows that are successfully added or refreshed in a DataSet.
  • The XmlDocument class represents the top node of an XML document.
  • The XmlReader class defines properties that are used to retrieve information about the name and content of the current node.
  • The System.Threading namespace provides interfaces and classes that enable multithreaded programming in XML.
  • The LineNumber property is inherited from the XmlSchemaObject class. It specifies the line number referred to by a schema element in a file.
  • An XML document must have only one top-level element known as a document element or root element. Each element must have both a start tag and an end tag.
  • An XML document consists of two main parts, namely prolog and document.
  • The GetChanges method of the DataSet class returns a copy of the DataSet. It contains all changes made to the DataSet since it was last loaded or since the AcceptChanges method was called.
  • The AutoIncrementStep property of the DataColumn class is used to set the value of the step by which the column value is to be incremented.
  • The SqlDataAdapter class is used to select, update, or delete data from a table. It does not create a table.
  • The Namespace property of the DataTable class is used to get or set the namespace for the representation of data stored in the DataTable in XML format.
  • The ResetCommandTimeout method of the SqlCommand class is used to set the CommandTimeout property to the default value, i.e. 30 seconds.
  • The text argument of the MessageBox() function can be used to display a message on the message box.
  • The EditItemIndex property of the DataGrid control is used to programmatically control which item is being edited.
  • The Load method of the XmlDocument class is used to load the contents of an XML file into an XmlDocument object.
  • The AutoGenerateColumns property is used to get or set a value that indicates whether or not the BoundColumns object are automatically created and displayed in the DataGrid control for each field in a data source.
  • The Clone method is used to copy the structure of the DataTable. It includes schemas and constraints, but it does not include the DataRow of a DataTable object.
  • The XmlNode class is used to represent a single node in the XML document.
  • The OuterXml property of the XmlNode class is used to retrieve the markup representing an XML node and its children nodes.
  • The DataReader class is used to retrieve a read-only and forward-only stream of data. It optimizes the performance of an application because only one row at a time remains in the memory.
  • The RowFilter property of the DataView class is used to get or set the expression to filter the rows to be viewed in a DataView object.
  • SQL Server 2000 supports the FOR XML clause with the SELECT statement. The FOR XML clause instructs the SELECT statement to return the query result in an XML format instead of a tabular format.
  • The PermitOnly method of the FileIOPermissionAccess class is used to prevent callers higher in the call stack from using the code that calls this method to access resources that are not specified by the current instance.
  • The xml data type is a built-in data type in SQL Server 2005. As with other built-in data types such as int and varchar, a user can define the xml data type on a column when he creates a table.
  • The AllowEdit property of the DataView class is used to specify whether or not the DataView object can be edited or modified.
  • The Count property of the DataView class is used to get the number of records from the DataView object after the RowFilter and RowStateFilter properties have been applied.
  • The Commit, Rollback, and Save methods are defined in the SqlTransaction class.
  • The Load method of the XmlDocument class is used to load the contents of an XML file into an XmlDocument object. It always preserves significant white space. It does not perform document type definition (DTD) or schema validation.
  • The Save method of the XmlDocument class is used to save an XML document to a specified file or location.
  • The XmlNode class derived from the System.Xml namespace is a representation of a single node in an XML document. It is the base class in the XML DOM, and supports XPath selections and provides editing capabilities.
  • The ExecuteNonQuery method of the SqlCommand class returns an integer value, which indicates the number of rows affected as a result of the execution of a SQL statement.
  • The XmlDocument class that defines within the System.Xml namespace is used to represent an XML document.
  • The ImportNode method of the XmlDocument class is used to import the node from another XML document.
  • The SqlConnection class represents an open connection to a SQL Server database. ADO.NET supports connection pooling where the SqlConnection class is used to increase the performance of the application.
  • The BeginTransaction method of the SqlConnection class starts a database transaction.
  • The SqlTransaction.Connection property returns a SqlConnection object in association with a transaction that can take place for each new database connection.
  • An XmlReader class is created to display the XML file from a database. The Read method is implemented in order to read data from the XML file.
  • The AllowDBNull property of the DataColumn class returns a value to indicate whether null values are allowed in the column to retrieve specified data records.

Testing and Debugging

  • The security policy levels in hierarchical order are Enterprise policy, Machine policy, User policy, and Application domain policy.
  • The Debug and Trace classes share the same Listeners collection. Therefore, if a listener object is added to either of the two, it will work for both the classes.
  • The Fail method of the Trace class displays errors only if the default trace listener is present in the listeners collection.
  • The WindowsPrincipal class is used to check the Windows group membership of a Windows user. It can be used to check whether or not a user belongs to a domain user group.
  • A try block must be accompanied by at least one catch block or one finally block.
  • The EventLogTraceListener class provides a listener that directs debugging or tracing output to an EventLog.
  • Trace switch is an object that exists in the application code that allows filtering information. It allows enabling, disabling, and filtering of output in an application.
  • The WriteLine method of the Trace class is used to write a string to the trace listeners.
  • The WriteIf method of the Trace class is used to write information about the trace to the trace listeners if a condition is true.
  • The customErrors element of the Web.config file provides information about custom error messages for ASP.NET applications.
  • The mode attribute of the customErrors element is used to specify whether custom errors are enabled, disabled, or shown only to remote clients.
  • The Warn method of the TraceContext class writes warning messages in red color to the trace log.
  • The Write method of the TraceContext class writes trace messages (excluding warning messages) to the trace log.
  • The TraceError property of the TraceSwitch class returns True if Level is set to Error, Warning, Info, or Verbose; otherwise it returns False.
  • The TraceWarning property of the TraceSwitch class returns True if Level is set to Warning, Info, or Verbose; otherwise it returns False.
  • Each class is made up of properties, methods, and events. A property is a named attribute of an object. It defines the characteristics of an object, such as name.
  • The Locals window is a debugging window and its contents change to reflect only the variables applicable to the current procedure. Global variables and variables in other projects are not accessible from this window.
  • The Write method of the Debug class displays messages and writes variable values to the Output window, when an application is either stopped or paused.
  • A project’s build configuration specifies how the project in a solution is to be built and deployed. Setting the Configuration property to Debug generates a program database file (.pdb) that contains information about symbols used within the application on compiling the project.
  • The QuickWatch dialog box is used to quickly examine and evaluate variables and expressions for debugging.
  • The Print method of the Debug class can be used to display a message with a line terminator in the trace listeners collection.
  • When a debugger is attached to a running service, the current functioning of the Web service will be interrupted. As soon as the debugger starts its debugging, the service does not actually stop or pause the service’s processing. Instead, the service is still in the start mode when the application is debugged, but the service process has actually been suspended.
  • White box testing includes designing tests such that every line of the source code is executed at least once or that every function is tested individually.
  • Logical errors are those errors that appear in an application once it is in use. An application with logical errors compiles and executes correctly. However, it does not produce the desired result.
  • The Output debugging window is used to display status messages at runtime. It also displays output that results from debugging instructions placed in the code. The content of the Output window is cleared each time the application is compiled or run.
  • A breakpoint is a location in an application at which the execution of the application pauses temporarily. When an application encounters a breakpoint, it enters into break mode. A user can remove all the breakpoints in a solution at once by selecting Clear All Breakpoints from the Debug menu.
  • The compilation element of the Web.config file is used to configure compilation settings of ASP.NET.
  • The Watch window is used to see the values of variables within different scopes, i.e., module level, procedure level, and global variables.
  • The following are the advantages of Unit testing:
    1. A large percentage of defects can be identified during the process of Unit testing.
    2. It enhances the process of testing, as the elementary units of an application are tested separately.
    3. It reduces the cost of testing, as small special programs such as test drivers and stubs can be reused during the whole process of testing.
    4. It also simplifies the process of debugging, as it limits the search for errors to a small unit of the application, instead of searching the whole of the application.
  • The Regression testing is used to make sure that no new errors are found in an application. It can be performed any time when a program needs to be modified either to add a feature or to fix an error.
  • Testing a software aims at fulfilling each and every requirement specified in the software specification. A test plan can be defined as a formal document that guarantees that the software has been tested thoroughly, meets user requirements, and has no defects.
  • The Call Stack debugging window is used for viewing the list of currently active procedure calls.

Deploying a Windows-based Application

  • The Strong Name (Sn.exe) tool is used to sign assemblies with strong names. It also provides signature generation, signature verification, and key management.
  • The Custom Actions editor is used to define custom actions that can execute code at the end of an installation process to perform actions, such as the installation of location-specific files, which cannot be handled during installation.
  • The following are the various features of .NET deployment:
    1. By default, multiple applications do not share components.
    2. Multiple applications need to explicitly make the components available for sharing by assigning a strong name to an assembly.
    3. No-impact applications isolate an application and remove DLL conflicts.
    4. Private components have no impact on other applications.
    5. Side-by-side versioning deploys multiple versions of a component or an application.
  • The Common Language Runtime finds an assembly through the codebase setting. If no match is found in the location as specified in the <codebase> element in the application configuration file, the binding request fails. Then the CLR tries to find the assembly through probing.
  • Debugger (Cordbg.exe) is a tool that provides command-line debugging services. It uses runtime Debug API to debug managed code. It also helps to find and fix bugs in programs that target the .NET Framework common language runtime.
  • Type Library Importer (Tlbimp.exe) tool is used to convert the type definitions from a COM type library into equivalent definitions in a common language runtime assembly.
  • The Reset method of the PolicyLevel class is used to set the current policy level to the default state.
  • An application uses the System.Data namespace to connect to a database.
  • The Launch Condition tab in the Project Properties dialog box is used to specify conditions for installation. These conditions can be used in conjunction with a file, registry, or component search. They can be used to terminate the installation if the specified item is not found.
  • The .NET Framework provides the development and runtime environment for .NET applications. It is composed of several components that are required to build and run .NET-based applications.
  • The Resgen.exe tool can be used to perform the following tasks:
    1. Convert .txt files to .resources or .resx files.
    2. Convert .resx files to .txt or .resources files.
    3. Convert .resources files to .txt or .resx files.
  • The Windows Explorer allows installation and uninstallation of assemblies in the Global Assembly Cache by using drag and drop and menu operations.
  • The CAB project is a Setup and Deployment project, which is used to create a .cab file containing a set of files in a compressed archive.
  • If an application calls a large number of methods or large shared libraries at startup, using pre-compilation is the best technique to optimize the performance of the application during startup. Pre-compiling the application with Native Image Generator (Ngen.exe) reduces its startup time.
  • The utilities for the verification of the security policy for a deployed application are Caspol.exe, Preverify.exe, and Permview.exe.
  • The File System editor can be used to add project outputs to a deployment project. It can be used to specify the location on the target computer where files are to be installed, and to create shortcuts on the target computer.
  • The Data and Settings Management category of the Windows XP logo specifies that an application must provide custom settings as per-user.
  • Only users with Administrator privileges can delete files from global assembly cache (GAC). GAC provides side-by-side versioning by storing multiple copies of assemblies.
  • The .NET Framework allows sharing of an assembly among multiple applications. Such an assembly is called shared assembly. All assemblies stored in global assembly cache must have strong names.
  • The Installutil.exe tool can be used to install multiple assemblies at a time. It performs installation in a transactional manner.
  • For deploying shared assemblies, the binding policy determines the place to search for the assembly and version to bind the application. The searching process of the CLR involves the following three stages of the binding policy resolution:
    1. Application policy resolution
    2. Publisher policy resolution
    3. Administrator policy resolution
  • The following are the steps that determine the correct version of an assembly:
    1. The CLR examines the application configuration file.
    2. It examines the publisher policy file.
    3. It examines the machine configuration file.
  • Web services directory is a central location for publishing Web service information. These directories are used to locate organizations providing Web services and different Web services provided by an organization.
  • Web service discovery is a preliminary process for accessing a Web site. It locates Web service descriptions. Through the discovery process, Web service clients know about the existence of a Web service, its capabilities, and how to interact with it.
  • Declarative security check is a security check performed on the declarative information in metadata. It uses attributes to place security information into the metadata of application code.
  • Imperative security check is a security check that occurs on calling a security method within the code being protected. It works by instantiating security classes and using them directly. It can be isolated within an object or method.
  • The LicenseManager class manages a LicenseProvider and provides methods and properties for adding license to a control.
  • The Copy method of the SecurityPermission class is used to create identical copies of the permissions that have been applied to the code.
  • The HttpChannel class is used to provide an implementation for a sender-receiver channel that uses the HTTP protocol for transmitting messages.
  • The SoapFormatter class is used to serialize and deserialize an object in SOAP format.
  • The SecurityAction.RequestMinimum value is used to request for the minimum permissions required for code to run.
  • The SecurityAction enumeration is used to specify the security actions that can be performed by using declarative security.

Maintaining and Supporting a Windows-based Application

  • The Kill method of the Process class immediately terminates a process. It causes abnormal process termination. If the Kill method is used to terminate a process, the resources allocated to the process and the data edited by the process may be lost.
  • A constructor is used to create an object that is an instance of a class. It has the same name as the class in which it resides.
  • A destructor is a special type of method used to destroy instances of a class when they are no longer used by an application. A destructor has the same name as the class in which it resides, preceded by a tilde (~) symbol.
  • Custom actions of the Windows installer allow developers to execute code during an installation process to perform actions such as pre-compiling an assembly during installation, creation of a local database, etc.
  • The SqlException exception is thrown when SQL Server returns a warning or error.
  • The Option Strict statement determines the data type conversions supported by an application. This statement is used along with an On or Off switch.

Configuring and Securing a Windows-based Application

  • The User Interface editor allows a developer to change the visual screen, which the user sees while installing an application.
  • The inner join is used to retrieve records from two tables that are combined and added to a query’s result set. The result can be retrieved only when the values of the joined fields meet a specified criteria.
  • Basic authentication is used to authenticate users on the Internet and enables a browser to prompt a user for a username and password. It requires remote users to use a valid Windows NT account name and password to access the Web server.
  • Code Access Security Policy (Caspol.exe) tool enables users and administrators to view and configure security policies.
  • Left outer join produces all records from the left table with the matching records from the joined table.
  • Authorization determines whether or not a principal is allowed to perform a requested action.
  • The IsSubSetOf method of the PrincipalPermission class is used to determine whether or not the current permission object is a subset of the specified permission object.
  • The GetCurrent method of the WindowsIdentity class returns a WindowsIdentity object representing the current Windows user.
  • The IsInRole method of the WindowsPrincipal class is used to determine whether or not the current principal belongs to a specified Windows user group.
  • The Union method of the PrincipalPermission class is used to create a permission object that is the union of the current permission object and a target parameter permission object.
  • In the Packet Privacy authentication level, authentication and encryption of data are performed. This level includes data integrity and the identity and signature of a user.
  • The Windows authentication provider authenticates users on the basis of their Windows accounts.