Creating and Accessing XML Web Services
- Web Services Description Language (Wsdl.exe) is a tool used to generate code for XML Web services and Web service clients from WSDL, XSD schema files, and discovery documents.
- Use the XML (Extensible Markup Language), SOAP (Simple Object Access Protocol), XSD (XML Schema Definition), and WSDL (Web Services Description Language) protocols to create a Web service. Use MessageName property to implement two Web methods with the same name and ensure that each of these two Web methods is uniquely identified when it is called separately.
- Use the CacheDuration property of the WebMethod attribute to specify the number of seconds for which the response should be held in the cache.
- Use the Namespace property of the WebService attribute to specify the namespace of a proxy generated by Visual Studio .NET 2005.
- Use the BufferResponse property of the WebMethod attribute to serialize the Web method response into a memory buffer until the response is completely serialized and returned back to the Web service clients over the network.
- Use the EnableSession property of the WebMethodAttribute class to enable session state for an XML Web service method.
- Use the MessageName property of the WebMethod attribute to give an alias name to an XML Web service method and it is generally used to uniquely identify overloaded Web methods.
- Use the [WebMethod(TransactionOption = TransactionOption.RequiresNew)]
statement to indicate that an XML Web service method requires a new transaction. Whenever any request is made and processed, an XML Web service is created within a new transaction. - Use the following code segment to create an XML Web service:
[System.Web.Services.WebService(
Namespace=http://MyServer/SampleReport)]public class Service : System.Web.Services.WebService
- Use the @ OutputCache directive to control the output caching policies of an ASP.NET page or a user control contained in an ASP.NET page. The Duration attribute of the @ OutputCache directive specifies the amount of time (in seconds) for which a control is cached.
- Use the MessageName property of the WebMethod attribute to give an alias name to an XML Web service method. It is generally used to uniquely identify overloaded Web methods. By default, the MessageName property for a Web method is set to the name of the method.
- Use the TransactionOption property of the WebMethod attribute to support a transaction for a Web method. This property enables a Web service method to participate as the root object in a transaction.
- Use the SoapDocumentMethodAttribute and SoapRpcMethodAttribute classes of the System.Web.Services.Protocols namespace to provide the SoapDocumentMethod and the SoapRpcMethod. These methods are used to format SOAP messages and allow setting the value of the OneWay property. This property accepts a boolean value that indicates whether the Web service client has to wait for a response from the Web server.
- Use the [WebMethod()] attribute to declare a method within an XML Web service that makes the method callable from remote Web clients.
- Use the CacheDuration property of the WebMethod attribute to specify the number of seconds for which the response should be held in the cache. The default value for this property is zero.
- Use the Cache object to store the product information in the memory of the computer to enhance the performance of MyWebService.
- Create a Web service and use Web service discovery to locate Web service descriptions.
- Deploy a Web service and ensure that its components (Web application directory, .asmx file, Web.config file) are published on the Web.
- Use an XML Web service to open wire formats to communicate between different systems. Open wire formats are the protocols that support common Web standards, such as HTTP and SOAP.
- Use the DiscoveryDocumentReference class to discover the available XML Web services at a given URL. The URL must point to the discovery document that has the .disco file extension.
- Use a discovery file to automatically generate when a Web reference is added to the Web service from a client ASP.NET application.
- Create an XML Web service to publish the XML Web service within the company’s Intranet.
- Install a setup package on a computer, based on a condition. Add a search for the registry key in the Launch Condition tab in the Project Properties dialog box.
- Use an XML Web service to provide a particular element of functionality, such as application logic. It can be used internally by an application or externally over the Internet by any number of applications using Internet standards, such as XML and HTTP.
- Use the Web Setup Project template to create installation packages for deploying Web-based applications such as ASP.NET Web applications, and XML Web services. The Web Setup Project creates an installer package of an application and installs various files to a virtual directory on the Web server.
- Use the element of the application’s Web.config file to ensure that the trace output is appended to the bottom of each page.
- Use the Trace.axd Http handler to view the trace details of an application by setting the value of requestlimit=”[n]” in the application’s configuration file.
- Use the pageOutput attribute to set the value to true if the trace information is displayed both on an application’s pages and in the .axd trace utility, otherwise it sets the value to false.
- Use the Web Services description Language (Wsdl.exe) tool to define the format of messages that a Web service understands.
- Enable tracing for an application by using the element. The enabled attribute of the element specifies whether or not tracing is enabled for an application. By default, this attribute is set to false.
- Use the customErrors element to provide information about custom error messages for an ASP.NET application. The mode attribute of the customErrors element specifies whether custom errors are enabled, disabled, or shown only to remote clients.
- Use the customErrors element to provide information about custom error messages for ASP.NET applications. The mode attribute of the customErrors element specifies whether custom errors are enabled, disabled, or shown only to remote clients.
- Use the WebServiceBindingAttribute class to allow declaring one or more bindings for a Web service. Bindings represent a method of ensuring that the Web service conforms to certain specifications.
- Use HTTP-GET, HTTP-POST, and HTTP-SOAP protocols to test the WebService application from a Web browser by using ASP.NET.
- Use the TcpChannel, TcpClientChannel, and TcpServerChannel classes to authenticate as well as to encrypt data for secure data communication.
- Use the Custom Authentication by using SOAP headers. For user authentication, the user credentials in encrypted format are passed within the SOAP header of the SOAP message. The Web server, without regarding the platform hosted by the Web service, implements Custom Authentication.
- Implement the Style and Use format options to format the SOAP message. The Style attribute is used while formatting the Body element. The Use attribute is used with the Web method parameters and return values.
- Use SOAP 1.1 to allow additional elements to be added after the body part but the SOAP 1.2 does not allow additional elements to be added after the body part.
- Use the HttpMethodAttribute class to apply this attribute to an XML Web service client using HTTP-GET or HTTP-POST.
- Use the SoapDocumentServiceAttribute class to apply the optional SoapDocumentServiceAttribute to an XML Web service that sets the default format of SOAP requests and responses sent to and from XML Web service methods within an XML Web service.
- Use the SoapHeaderAttribute class to apply the SoapHeaderAttribute on an XML Web service method or an XML Web service client to specify a SOAP header that the XML Web service method or an XML Web service client can process.
- Use Session object to create a variable that will be available as long as the session is active. The Session object pertains to an individual user’s session with the Web service.
- A session cookie can be used as a user preference so that important information of a Web site is provided to the users.
- The Cache object implements the cache for a Web application. The Session object pertains to an individual user’s session with an application. It is used to store and retrieve information during a specific session for the user.
- The mode=”InProc” attribute is used in the element of the application’s Web.config file to configure the session state settings for an application.
- Use the EnableSession property of the WebMethod attribute to specify whether or not the data stored in the Session object is available.
- Create an array of data containing the user’s session and use the Session object for data storage. If the Session object is enabled, only users of a particular session will be redirected to other Web pages to view them. The server destroys the session object when the session of a user expires.
- Use the Session and Application objects to provide state management. The EnableSession property of the WebMethod attribute make data stored in the Session object available to the clients.
- Use the EnableSession property of the WebMethodAttribute class to enable session state for an XML Web service method.
- Use the SoapUnknownHeader class to handle the 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.
- Use the SoapHeaderAttribute class to specify a SOAP header so that the Web methods that implement the class are able to process data passed to the SOAP header.
- Use MemberName property of the SoapHeaderAttribute class to specify the member of the XML Web service that represents the SOAP header contents.
- Use the SoapException class to throw SoapException when an XML Web service method is called over SOAP and an exception occurs.
- Develop a Web application and use exception handler to handle exceptions. When a response is not formatted correctly for a request, a CLR SOAP Exception is thrown. The SOAP Exception occurs in the XML Web service method.
- Create a SOAP extension to log the SoapMessageStage. Use the AfterSerialize to insert output to a log file. The AfterSerialize stage occurs just after a SoapMessage is serialized but before the SOAP message is sent over the wire.
- Use Soap (Simple Access Protocol), UDDI (Universal Description, Discovery, and Integration), and WSDL (Web Services Description Language) protocols to discover Web Services and interfaces on the Internet for a WebService.
- Use the GetInitializer method of the SoapExtension class to initialize the data used by the SOAP extension class and use the ChainStream method to access the incoming stream from the SOAP message.
- Use IIS to deploy the .NET Remoting object and use SSL to encrypt the HTTP traffic. The HttpChannel object is used to provide an implementation for a sender-receiver channel that uses the HTTP protocol for transmitting messages. The SoapFormatter object is used to serialize and deserialize an object in the SOAP format.
- Use the SerializableAttribute attribute to specify whether or not a class can be serialized. Use the MarshalByValue objects that are remotable objects and implement the ISerializable interface.
- Use the element to configure ASP.NET authorization support. It contains sub elements. These sub elements are used to allow or deny access to a resource based on specific users or roles.
- Properties set by one of the client applications can be accessed by all the applications using object of the application. Configure Object as a server-activated Singleton object. Mark the Object class with the Serializable attribute. Implement the ISponsor interface in the Object class.
- Use the SerializableAttribute attribute to identify whether or not a class can be serialized. Making a class serializable will make all the twenty properties available to the client applications. Using the SerializableAttribute attribute is the easiest way to make a class serialized.
- Use the System.Runtime.Remoting and System.Runtime.Remoting.Channels.Tcp namespaces in the Web service application that enable encoding Objects in binary format while transmitting data to a remote client computer by using the TCP protocol.
- Create an object, which is used by multiple applications and ensure that the properties set by one of the client applications can be accessed by all the applications using the object.
- Create Utils as a SingleCall object whenever a user makes a call to the service.
- Use breakpoints while debugging an application. A breakpoint specifies a line in a method or sub procedure at which Visual Studio .NET automatically suspends execution.
- Develop an XML Web service and use the User Interface Editor during installation.
- Develop a server application for hosting Object. Create a Windows service to execute in the background and register the object as a client-activated object.
- Use the Configuration property to debug and generate a program database file (.pdb) that contains information about symbols used within the application on compiling the project. It also lets breakpoints invoked on debugging.
- Debug a Web service by the Services Control Manager, the Visual Studio .NET Server Explorer, or code, and then add a debugger to the process in which the service is running.
- Use the element to use a client application that can test an object.
- Use the element to specify that an application configures the channel through which it communicates with remote objects. A new channel, which is not a channel template, can also be declared and configured.
- Use the following code segment to secure a method from unauthorized users:
GenericIdentity GenIdentity = new GenericIdentity(“Generic”, “Custom”);
string[] GeoRoles = {“GeoSurvey”};
GenericPrincipal GeoPrincipal = new GenericPrincipal(GenIdentity, GeoRoles);
Thread.CurrentPrincipal = GeoPrincipal; - Use the BinaryFormatter class and FileStream class for serialization to serialize and deserialize an object.
- Develop an application and use Secure Sockets Layer (SSL) protocol before application is sent to remote computer using WebResponse and WebRequest classes.
- Use the MarshalByRefObject class to specify the initial span of time that an object should remain in memory before the lease manager begins the process of deleting the object.
- Use asynchronous processing, multiple processes run at the same time. The two main tasks that must be handled in order for asynchronous processing to work: The server component and the Client application. The server component must be able to send a message to the client application when the process is complete. Client applications must be able to receive messages.
- Use the object pooling COM service to save the resources that are used during object creation. The objects are created at each method call in a non-pooled environment, and on activation, the object is extracted from the pool. Similarly, the object is returned to the pool on deactivation.
- Create a Web service and use the Web service to create a remote method by using the System.Runtime.Remoting.Messaging namespace.
- Create a Web service application and declare a synchronous method and then convert the same method to the asynchronous method.
- Create a Web service application and a OneWay WebMethod, and declare a class in which it will call a remote method asynchronously, and finally test the result.
- Create a Web service and use the Web service to create a remote method by using the System.Runtime.Remoting.Messaging namespace.
- Develop an XML Web service to use the FileIOPermission class and the PermitOnly method.
The GetChanges method of the DataSet class returns a copy of the DataSet containing all changes made to the DataSet since it was last loaded, or since the AcceptChanges method was last called. - Use the FileIOPermission class to control the ability to access files and folders. The PermitOnly method is used to prevent callers higher in the call stack from using the code that calls a method to access resources that are not specified by the current instance.
- Use the EventLogTracelistener object to provide a listener that directs debugging or tracing output to an EventLog.
- Use AutoLog property of the ServiceBase class to determines whether or not a service automatically logs the entries in the event log when events such as Start, Stop, Pause, and Continue occur.
- Use the EventLog class to interact with Windows event logs and use the Source property of the EventLog class to specify the source name to register and use when writing to the event log.
- Use the CreateEventSource() method of the EventLog class to create an event if the event log does not already exist and register a Web service with this event log.
- Use the CreateEventSource method of the EventLog class to establishe an application as a valid event source for writing event information to a particular event log on a computer.
- Use the CanHandlePowerEvent property and the OnPowerEvent() method to handle an InvalidOperationException exception.
- Use the element to specify that a value of an attribute must be unique within the specified scope.
- Use the element to contain an XML Path Language (XPath) expression and specify that the location in which the values are specified must be unique. Use the element to specify the field on which the values must be unique.
- Implement interfaces belonging to the System namespace in application code using the TreeView window.
- Use the WSE 3.0 features by changing the inheritance chain. Instead of inheriting from the System.Web.Services.Protocols.SoapHttpClientProtocol class, the proxy class needs to inherit from the Microsoft.Web.Services3.WebServicesClientProtocol class.
- Create a proxy class derives from SoapHttpClientProtocolthat derives from the abstract WebClientProtocol class. Now, write code that will generate the proxy class.
- Use the Web service application to create a configuration file and define the structure of the configuration file and how it relates to WSE 3.0.
- Use a Web service to create a SOAP message and use the AsynchronousOperationException class to throw an exception when the format of a SOAP message is invalid.
- Use the AsyncState property of the AsyncResult class to get a user-defined object that contains information about the asynchronous operation.
- Use a Web service application to create a policy for digital signatures and choose all the appropriate namespaces that can be used to create a policy for digital signatures.
- Use the X509Certificate class to create an X509Certificate class object in a Web service application and fill the object of the X509Certificate object with data by using overloaded Import method.
- Use the GetRawCertData method to get the data from the X509Certficate class object as a byte[] array and Use the GetRawCertDataString method to get the data from the X509Certficate class object as a string.
- Use the GetKeyAlgorithmParameters method to get the key algorithm parameters for the X.509v3 certificate from the X509Certficate class object as a byte[] array and Use the GetKeyAlgorithmParametersString method to get the key algorithm parameters for the X.509v3 certificate from the X509Certficate class object as a string.
- Use the overloaded constructors of the BinarySecurityToken class to encrypt the SOAP message.
- Use the overloaded constructors of the DerivedKeyToken class to encrypt the SOAP message.
- Use the overloaded constructors of the EncryptedKeyToken class to encrypt the SOAP message.
- Use the overloaded constructors of the KerberosToken class to encrypt the SOAP message.
- Use the overloaded constructors of the UsernameToken class to encrypt the SOAP message.
- Use System.Net.WebException class to handle exceptions. Set the timeout value for a Web service call to -1, when a debugger is attached to an XML Web service.
- Use the Attributes to validate XML document. Develop an XML Web service to validate the contents of an .xml file by connecting an XML schema to the XML file.
- Create a policy file with the help of WSE 3.0.. Initially write three steps to create and implement a policy file and use the structure of the policy file to inject input filters, output filters, or both, into the processing pipeline.
- Add policy assertions to a policy using the WSEConfigEditors3 dialog box. In the WSEConfigEditor3 dialog box, specify the policy name and in the WSE Security Settings Wizard, use Client Authentication methods: Anonymous, Windows, Username, and Certificate.
- Use a Windows service to execute in the background and in its own process space, with a specific user identity. Usually, it does not involve any user interaction.
- Create a secure SOAP message in the Web service and use the SoapFilter class in the Web service to filter the SOAP message.
- Create a secure SOAP message in the Web service and use the ReceiveSecurityFilter class in the Web service to handle the receiving and securing of SOAP messages.
- Create a secure SOAP message in the Web service and use the SendSecurityFilter class in the Web service to handle the transmission and securing of SOAP messages.
- Develop a Windows application and use Microsoft SQL Server as a backend database to perform declarative and imperative security checks.
- Use a Web service to implement an application to send messages and create a new object of the SoapSender class, and implement the required namespaces.
- Create a new handler class that inherits from the SoapReceiver class and override the Receive method, and process the message parameter according to the requirement.
- Use a Web service to create a SOAP message to define a messaging connection that allows messages to be received from a given endpoint using HTTP with the help of the SoapHttpInputChannel class and perform asynchronous receive operation.
- Use a Web service to create a SOAP message to define a messaging connection that allows messages to be sent a given endpoint using HTTP with the help of the SoapHttpInputChannel class and perform.
- Configure the WSE router application by adding one or more elements. These elements are added to the Web.config file for the WSE router Web service.
- Create a WSE router application using a Web service. The router serves as an intermediary between the outside world and a Web service.
- Create a referral cache file for a WSE router application using a Web service and ensure that the user account under which WSE runs has accessed to this file. Now, Add a configuration section to the Web.config file for the WSE router.
- The FileAuthorizationModule module is used when the authentication mode attribute is set to Windows in the element and checks against the access control list (ACL).
- The UrlAuthorizationModule class of the System.Web.Security namespace is used to provide URL-based authorization services to allow or deny access to specified resources.
- Use integrated windows authentication to ensure that the authentication used should not work over HTTP proxies. Integrated Windows authentication is a method of authentication that uses the security features of Windows clients and servers.
- Use the Regsvcs.exe tool to load and register assemblies as well as generate, register, and install a type library into a COM application.
- Create a serviced component and use an assembly to deploy the Component after registering the assembly.
- Register a serviced component using manual registration, dynamic registration, or programmatic registration.
- Use a publisher policy configuration file to contain 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.
- Use the Server Application of the COM application to provide high-level security to the component.
- Use ComponentAccessControl, ApplicationAccessControl, SecureMethod, and SecurityRole attributes to configure security of a COM component.
- Create a proxy class for a Web service manually and createed methods for calling the XML Web service method asynchronously using Wsdl.exe tool.
- Use the .NET Framework to allow sharing of an assembly among multiple applications after installing it into the global assembly cache.
- Host the serviced component in a COM application by assigning a strong name to the assembly, registering the assembly in the Windows registry, and registering and installing the type library definitions in a COM application.
- Use the [ClassInterface(ClassInterfaceType.AutoDual)] attribute to define the COM based component class to ensure that component class is built without any error.
- Use the InterfaceQueuing attribute when message queuing is done at the component level. COM calls client requests on the components that are to be recorded and stored in the queue even when the server component is unavailable.
- During the Manual registration, the assembly fails to load error type occurred due to which the error message that describes the reason for the failure is displayed as output.
- Use the SecurityRole attribute of the [assembly] element to allow the COM security configuration for the library or server application.
- Use the AutoComplete attribute of System.EnterpriseServices namespace to apply to the methods of the serviced component class.
- Use the Sn.exe tool to sign a component. Strong Name (Sn.exe) is a tool used to sign assemblies with strong names. It also provides signature generation, signature verification, and key management.
- Use the Just-in-Time Activation service to minimize the amount of time for which an object is created and consumes resources and services on the server. With JIT activation, a client can hold a reference for an object on the server.
- Use the Web References dialog box to refer to XML Web services published on either a local Intranet or the Internet.
- Use the Gacutil.exe tool 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.
- Use the AutoComplete attribute to apply to methods of a class that derives from the ServicedComponent class. It enables an object that is participating in a transaction to vote in favor of completing the transaction if the method calls returns normally.
- Use the ServicedComponent class of the System.EnterpriseServices namespace. A serviced component is a .NET component that uses component services of COM, such as object pooling, transaction management etc.
- Use the [ClassInterface(ClassInterfaceType.AutoDual)] attribute to define a component class. The class interface exposes public properties, methods, fields, and events that are explicitly exposed on a .NET object.
- Use the PrincipalPermissionAttribute class or method to declaratively demand that users running code within the class or method belong to a specified role or have been authenticated.
- Use the Union method of the PrincipalPermission class to create a permission object that is the union of the current permission object and a target parameter permission object.
- Use the GenericPrincipal class and the GenericIdentity in conjunction with each other to create an authorization scheme. These two classes can be used to prompt users for their user names and passwords, to check these values against a database, and to create principal and identity objects.
- Use the MessageQueue and Message classes to set up the message queue programmatically. The static method of the MessageQueue class is used to check whether the queue already exists. If it does not, create the queue and set the label to match the name of the queue.
- Create public and private message queues using MessageQueue class.
- Create a public transactional message queue using the MessageQueueTransactional class.
- Create a private transactional message queue using the MessageQueueTransactional class.
- Use the Web service application to create a message queue and set permission on it using the MessageQueue class.
- Implement the BeginReceive and the EndReceive methods of the MessageQueue class. Use the BeginReceive method to initiate an asynchronous operation and a MessageQueue object to begin receiving a message and notifies the ReceiveCompleted event handler when the operation is finished. Use the EndReceive method to call it when the ReceiveCompleted event is raised. The method completes the specified asynchronous operation received by the MessageQueue object.
- Use the Express Messaging to deliver the message successfully. The Express Messaging is a type of message delivery method that stores messages in the Random Access Memory (RAM).
- Use overloaded Send method of the MessageQueue class to send message to a message queue.
- Create a message queue and insert messages in it. Now, delete all the messages that were inserted into the public and private message queues using the Purge() method of the MessageQueue class.
- Use the EncryptionRequired enumeration to specify the privacy level. It consists of three members: Body, None, and Optional.
- Use the XmlMessageFormatter class to serialize and deserialize objects to or from the body of a message.
- Use the properties of the certificate to see whether a trusted user publishes it.
- Use the UseAuthetication property with the SenderId property to verify the sender’s authentication. The UseAuthentication property specifies whether the message needs to be authenticated.
- Implements the StreamReader class in the application. Use Peek method of the StreamReader class to go to end of the file. The Peek method returns an integer type value to determine whether or not the end of the file or an error has occurred. It returns value -1 if no characters are available on the stream or the end of file has reached.
- Use overloaded Receive method of the MessageQueue class to receive message from a message queue.
- Use overloaded ReceiveById method of the MessageQueue class to receive message from a message queue that matches the given ID.
- Use overloaded ReceiveByCorrelationId method of the MessageQueue class to receive message from a message queue that matches the given correlation ID.
- Use overloaded BeginPeek method of the MessageQueue class to begin peeking a message from a message queue.
- Use overloaded BeginReceive method of the MessageQueue class to begin receiving a message from a message queue.
- Use Basic authentication to authenticate users on the Internet and enables a browser to prompt the user for a username and password.
- Use the MessageQueue class to create a queue and then send a message to the MessageQueue using the Message class. Specify access rights for a trustee (user, group, or computer) to perform application-specific implementations of common tasks.
- Use the MessageQueue class to create a queue and then send a message to the message queue using the Message class. Specify access rights for a trustee (user, group, or computer) to perform application-specific implementations of common tasks by using the overloaded AccessControlEntry constructor.
- Use the MessageQueue class to create a queue and then send a message to the queue using the Message class and allow code access permissions for messaging by using the overloaded constructors of the MessageQueuePermission class.
Pass 70-529-CSHARP exam in the first attempt. Full featured Tests. 472 questions with answers and 373 study notes articles and exam tips:
C#.NET 2.0 Distributed Application Development
Download link: https://www.ucertify.com/exams/Microsoft/70-529-CSHARP.html
Configuring and Customizing a Web Service Application
Creating, Configuring, and Deploying Remoting Applications
To analyze the capabilities of the simulation software, you can download a demo version and evaluate the PrepKit free of cost. Click the link below:
C#.NET 2.0 Distributed Application Development
Download link: https://www.ucertify.com/exams/Microsoft/70-529-CSHARP.html
Implementing Asynchronous Calls and Remoting Events
Implementing Web Services Enhancements (WSE) 3.0
Creating and Accessing a Serviced Component and Using Message Queuing
Download full version of MCTS 70-529-CSHARP certification PrepKit:
C#.NET 2.0 Distributed Application Development
Download link: https://www.ucertify.com/exams/Microsoft/70-529-CSHARP.html