What should you do?
A client application must connect to a .NET Framework remoting class that is running in a Windows service that is deployed to a computer named APPSERVER1.
The class is named SimpleMathClass and it exists within a namespace named SimpleMath in an assembly named SimpleMathLib.
It is exposed through the TCP and it is configured with the objectUri attribute set to SimpleMath.rem.
You write the following XML configuration settings in the App.config file of the client application.
<configuration>
<system.runtime.remoting>
<application>
</application>
</system.runtime.remoting>
</configuration>
You need to ensure that the client application can connect to the remoting class.
What should you do?
What should you do?
You are writing a .NET Framework remoting client application.
The server application raises events to the client application using an interface named IBroadcaster and an event wrapper.
The event wrapper and the interface are located in an assembly named General that is common to the client and server.
The server configuration file is as follows:
<system.runtime.remoting>
<application>
<channels>
<channel ref=”http” port=”2020″>
<serverProviders>
<formatter ref=”binary” typeFilterLevel=”Full” />
</serverProviders>
<clientProviders>
<formatter ref=”binary” />
</clientProviders>
</channel>
</channels>
<service>
<wellknown mode=”Singleton” type=”Server.Broadcaster, Server” objectUri=”Broadcaster.soap” />
</service>
</application>
</system.runtime.remoting>
You need to ensure that the server can raise events on the client application.
What should you do?
What are two possible ways to achieve this goal?
You use Microsoft Visual Studio 2005 to create a custom Web service discovery system that contains Disco files for your Web services.
You need to have the Disco file for each of your Web services for auditing purposes.
What are two possible ways to achieve this goal? (Each correct answer presents a complete solution. Choose two.)
Which code segment should you use?
You create a Web service that exposes a Web method named CalculateStatistics.
The response returned by the CalculateStatistics method for each set of input parameters changes every 60 seconds.
You need to ensure that all requests to the CalculateStatistics method that have the same set of input parameters, and that occur within a 60-second time period, calculate the statistics only once.
Which code segment should you use?
What should you do?
You call a method in a Web service.
The following exception is thrown in the Web service client.
System.Web.Services.Protocols.SoapException: Server was unable toprocess request. –> System.NullReferenceException: Object reference not set to an instance of an object.
You discover that it is the following line of code that throws the exception.
if (Session [“StoredValue”] == null)
You need to ensure that the method runs without throwing the exception. What should you do?
What should you do?
You create a Web service.
The method in the Web service maintains session information between calls.
When a client invokes the method, the following exception is thrown :
System.Web.Services.Protocols.SoapException: Server was unable toprocess request. —> System.NullReferenceException: Object reference not set to an instance of an object.
You need to ensure that the Web service method can be called without generating an exception.
What should you do?
What should you do?
You create a Web service that will be deployed to a production Web server.
You need to ensure that the first Web service request returns a response in the shortest amount of time possible.
What should you do?
What should you do?
You create a Web service.
The Web service must be deployed on a remote Web server.
You need to ensure that the deployment does not place the source code for the Web service on the Web server.
What should you do?
What should you do?
A Web service exposes a method named GetChart that returns an image.
The data used to generate the image changes in one-minute intervals.
You need to minimize the average time per request for CPU processing.
What should you do?
What should you do?
When you execute a client application, the following exception is
thrown.
EncryptedKeyToken is expected but not present in the security header of the incoming message.
You discover that the exception is thrown when the client application invokes a Web service named Math with the following code.
(Line numbers are included for reference only.)
01 try
02 {
03 MathWse ws = new MathWse ();
04 int result = ws.Add(1, 2);
05 }
06 catch (Exception ex)
07 {
08 MessageBox.Show(ex.Message);
09 }
The client application and Web service have the same Web Services Enhancements (WSE) 3.0 policy.
The policy configuration file contains the following policy section.
<policy name=”Secure”>
<anonymousForCertificateSecurity establishSecurityContext=”false” renewExpiredSecurityContext=”true” requireSignatureConfirmation=”false” messageProtectionOrder=”SignBeforeEncrypt” requireDerivedKeys=”true” ttlInSeconds=”300″>
<!– XML defining the serviceToken and protection –>
</anonymousForCertificateSecurity>
</policy>
You need to ensure that the client application can communicate with the Web service.
What should you do?