The Exam 70-320 Cram Sheet

Team-Fly    

Developing XML Web Services and Server Components with Visual C#™ .NET and the .NET Framework, Exam Cram™ 2 (Exam 70-320)
By Amit Kalani, Priti Kalani

Table of Contents


graphics/examgram.gif

This Cram Sheet contains the distilled, key facts about developing XML Web services and server components with Microsoft Visual C# .NET and the Microsoft .NET Framework. Review this information as the last thing you do before you enter the testing center, paying special attention to those areas where you feel you need the most review. You can transfer any of these facts from your head onto a blank sheet of paper immediately before you begin the exam.

  • You can create Windows services by using the functionality provided by the System.ServiceProcess.ServiceBase class.

  • For installation tools, such as installutil.exe to install an assembly, the assembly must have a class derived from System.Configuration. Install.Installer. If any custom installers (such as Windows service installers) need to be installed, they are added to the Installers collection of the Installer class.

  • The FCL provides the System.ServiceProcess.ServiceController class to programmatically control the Windows services.

  • The ServiceController.GetServices() method is used to enumerate installed services. You can use the Start(), Stop(), Pause(), and Continue() methods to change the status of a Windows service. The WaitforStatus() synchronous method is useful when pausing the current thread's execution and waiting for the Windows service to enter the specified state.

  • The Service Control utility (sc.exe) allows you to control and configure Windows services.

  • Classes that want to use COM+ component services must derive from the System.Enterprise Services.ServicedComponent class.

  • The COM+ object pooling service enables you to maintain already created instances of a component that are ready to be used by any client that requests the component.

  • To use the COM+ object-pooling service, a class must override the CanBePooled() method of the ServicedComponent class. In addition, you must apply the ObjectPooling attribute on the class.

  • The COM+ just-in-time activation service enables you to minimize the period of time that an object lives and consumes resources on the server.

  • You can enable the just-in-time activation service declaratively in your programs by using the JustInTimeActivation attribute. However, you must indicate to COM+ whether an object should be deactivated after a method call by setting the done bit to true.

  • The COM+ object construction service enables you to specify initialization information for a serviced component.

  • A transaction's outcome depends on the status of the abort bit that is maintained in the context of a transaction, as well as the consistent and done bits that are maintained in each context.

  • You can use the methods of the ContextUtil class to programmatically change the status of the consistent and done bits.

  • The AutoComplete attribute automatically calls the ContextUtil.SetComplete() method if a method completes successfully. Otherwise, ContextUtil.SetAbort() is called to abort the transaction.

  • A queued component is a serviced component that can be invoked and executed asynchronously.

  • You can configure security for serviced components by applying attributes within the code and then specifying COM+ roles with the Component Services tool.

  • The CCW enables communication between the calling COM code and the managed code, and handles conversion between the data types and other messages between the COM types and the .NET types.

  • Do not depend on the ClassInterface attribute to automatically generate a class because it leads to versioning problems. You should set the ClassInterface attribute for a class to the ClassInterfaceType.None value and create your own interface.

  • An assembly must be signed with a strong name before the assembly can be registered in the COM+ catalog.

  • The most recommended place to install a serviced component assembly is the GAC because it ensures that the CLR can always locate the assembly.

  • .NET remoting enables objects in different application domains to talk to each other even when separated by applications, computers, or the network.

  • To create a remotable object, inherit the remotable class from the MarshalByRefObject class.

  • SAOs are remote objects whose lifetime is directly controlled by the server.

  • You can activate SAO in two ways: SingleCall (object is created for each client request) and Singleton (object is created once on the server and is shared by all clients).

  • CAOs maintain state for each client with which they are associated.

  • The .NET Framework provides implementations for HTTP and TCP channels to allow the communication of messages over the HTTP and TCP protocols, respectively.

  • You can format messages in SOAP or binary format with the help of the SoapFormatter and BinaryFormatter classes in the FCL.

  • Do not specify a port number when you register the client channel. Instead, the port number is specified at the time of registering the remote class in the client's domain.

  • To register SAO objects, call the RemotingConfiguration.RegisterWellKnownServiceType() method on the server side, and the RemotingConfiguration.Register WellKnownClientType() method on the client side.

  • To register CAO objects, call the RemotingConfiguration.RegisterActivatedServiceType() method on the server side and the RemotingConfiguration.RegisterActivatedClientType() method on the client side.

  • You can use only the object's default constructor to instantiate SAO at the client side; you can use any of the object's constructors to instantiate CAO.

  • Because the .NET Framework enables you to store remoting configuration details in an XML-based configuration file rather than the code file, any changes in the configuration file are automatically picked up without any need to recompile the code files.

  • To configure remoting configuration details from configuration files, call the Remoting Configuration.Configure() method and pass the name of the configuration file.

  • You can use IIS as an activation agent for an SAO only when the underlying communication is an HTTP channel.

  • To make a class available via a Web service, mark the class with the WebService attribute.

  • To make a method available via a Web service, mark the method with the WebMethod attribute.

  • Properties of the WebMethod attribute enable you to control such things as the Web method's cache duration, session state, and transactions.

  • The WSDL lets you retrieve information on the classes and methods that a particular Web service supports.

  • You can generate proxy classes for a Web service manually by using the WSDL tool, and automatically by setting a Web reference to point to the Web service.

  • The Web Services Discovery Tool, disco.exe, can retrieve discovery information from a server that exposes a Web service.

  • A SOAP extension enables you to intercept SOAP messages before and after serialization, and before and after deserialization on both the client and the server.

  • SOAP extensions are classes that are derived from the base SoapExtension class.

  • The GetInitializer() method is called once when the SOAP extension is first loaded.

  • The Initialize() method is called once for each call to a Web method being monitored by the SOAP extension.

  • The ChainStream() method enables you to intercept the actual SOAP message stream.

  • The ProcessMessage() method is called with the actual SOAP requests and responses.

  • You can call a Web method asynchronously either via a delegate function or via a WaitHandle object.

  • The Abort() method of an appropriate WebClientAsyncResult object can be called to abort asynchronous Web method calls.

  • The XmlElement attribute enables you to specify the name and other details of a parameter in a SOAP message.

  • The XmlAttribute attribute enables you to specify that the XmlSerializer should serialize the class member as an XML attribute.

  • You can use IIS to control access to a Web service, and then use declarative or imperative security to control the access of the Web service to resources.

  • Using COM components from .NET managed code requires the creation of an RCW. RCWs impose a performance penalty on COM code.

  • You can create an RCW for a COM component by using the Type Library Importer tool, or by directly referencing the COM component from your .NET code.

  • To use COM components that you did not create, obtain a PIA from the component's creator.

  • You can use the .NET Framework platform invoke (PInvoke) facility to call functions from Windows libraries, including the Windows API.

  • You should use a StringBuilder object for a Windows API call that expects the method to modify a string buffer.

  • A strongly typed DataSet brings the benefits of early binding to your data access code.

  • The XmlReader class defines an interface for reading XML documents. The XmlTextReader class inherits from the XmlReader class to read XML documents from streams.

  • The XmlNode object can be used to represent a single node in the DOM.

  • The XmlDocument object represents an entire XML document.

  • The XmlDataDocument class is a subclass of the XmlDocument class that can be synchronized with a DataSet.

  • You can start the synchronization process with the XmlDataDocument or with the DataSet, or you can use a schema file to construct both objects.

  • You can use an XmlTextWriter object to persist an XmlDocument object to disk.

  • The SelectNodes() method of the XmlDocument object returns a set of nodes selected by an XPath expression.

  • The XPathDocument and XPathNavigator objects are optimized for fast execution of XPath queries.

  • The XPathNavigator object enables random-access navigation of an XML document's structure.

  • You can extract an inline schema from an XML file by using the ReadXmlSchema() method of the DataSet class.

  • You can infer a schema from the structure of an XML file by using the InferXmlSchema() method of the DataSet class.

  • The FOR XML clause in the SQL Server SELECT statement lets you generate XML documents directly from SQL Server data.

  • You can use the ExecuteXmlReader() method of the SqlCommand object to retrieve XML from a SQL Server database and assign it to classes within the .NET Framework.

  • You can use the XmlValidatingReader class to validate an XML document for conformance with an inline schema, an external schema, a DTD, or an XDR file.

  • The Debug and Trace objects share the same Listeners collection. Therefore, any Listener object added to the Trace.Listeners collection is also added to the Debug.Listeners collection.

  • Depending on a value stored in the XML configuration file, trace switches enable you to change the type of messages a program traces without recompiling the application.

  • The Trace and Debug classes can be used to display informative messages in an application when the DEBUG and TRACE symbols are defined, respectively, at the time of compilation.

  • The Conditional attribute enables you to conditionally add or skip a method for compilation, depending on the value of the symbol passed as a parameter to the attribute.

  • You can attach the debugger to a running process (either local or remote) with the help of the Processes dialog box.

  • When you attach a debugger to the ASP.NET worker process aspnet_wp.exe, it freezes the execution of all other Web applications on that server.

  • To debug COM+ server applications, you must attach a debugger to the dllhost.exe process in which the COM+ server application is running.

  • To debug a .NET remoting object, you must attach a debugger to the process in which the remoting server application is running. In case the object is hosted in IIS, you need to attach a debugger to the aspnet_wp.exe process.

  • To debug a Web service, you need to attach a debugger to aspnet_wp.exe or the client application that is calling Web methods of the Web service.

  • The System.Web.TraceContext class can be used to display trace messages in a Web application. You can easily view these messages by using the trace viewer utility, or at the end of the page output.

  • To enable ASP.NET tracing for a single page, set the trace attribute of the Page directive to true.

  • You can also enable ASP.NET tracing at the application level by setting the enabled attribute of the <trace> element to true in the application-wide web.config file.

  • The Windows Installer Service and the Installer tool (installutil.exe) perform installation in a transactional manner.

  • If you want a custom installer class to execute when a Web Setup project or the Installer tool is used to install an assembly, you need to apply the RunInstallerAttribute to the class and set its value to true.

  • The configuration settings for a .NET remoting object are stored in an XML configuration file, so no extra registration steps are required to deploy a .NET remoting object.

  • For a component that will be shared among multiple applications, you should package it as a merge module (.msm file). Merge modules need to be merged with the installation program of an application that uses the shared component.

  • To deploy a serviced component, you must register the component with the COM+ catalog, and you should install the component in the GAC.

  • Shared assemblies are used by multiple applications on a machine. Shared assemblies are placed in the GAC and enjoy special privileges, such as file security, shared location, and side-by-side versioning.

  • You generate a public/private key pair by using the Strong Name tool (sn.exe). This pair can be used to sign assemblies with a strong name.

  • The best way to add an assembly in the GAC during deployment is to use Microsoft Windows Installer.

  • The CLR first searches the GAC to locate assemblies and then looks in the files and folders where the assembly is installed. Thus, loading shared assemblies from the GAC is efficient because the CLR does not engage itself in looking in the <codebase> and <probing> elements of the applicable configuration files.

  • Different versions of an assembly can be deployed in the GAC for side-by-side execution. You can implement side-by-side execution by configuring the binding policy in the application configuration, the publisher policy file, or the machine-configuration file.

  • The publisher policy file can be used to deploy service packs, such as bug-fix updates, for the assemblies. The publisher policy file is an XML file that is converted into a strongly named assembly and installed in the GAC.

  • File-based authorization uses operating system security to allow or deny resources to files such as .aspx and .asmx files.

  • URL-based authorization uses the <authorization> section in the web.config file to control access to an application.

  • Identity impersonation enables ASP.NET to execute using the client's identity.

  • The WindowsPrincipal and WindowsIdentity classes enable you to check the current user's authentication status.

  • You can use the IsInRole() method of the WindowsPrincipal object to check for membership in Windows groups.

  • The PrincipalPermission class enables you to perform declarative or imperative role-based security operations.


    Team-Fly    
    Top


    MCAD Developing XML Web Services and Server Components with Visual C#. NET and the. NET Framework Exam Cram 2 (Exam Cram 70-320)
    Managing Globally with Information Technology
    ISBN: 789728974
    EAN: 2147483647
    Year: 2002
    Pages: 179

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net