|
Braindumps of 70-529
MS.NET Framework
2.0-Web-based Client Development
Exam Questions, Answers,
Braindumps (70-529)
Submitting dumps with some changes. The original is
also available in
www.braindumps.org.
Question: 1
You write an XML Web
service. The XML Web service contains Web methods that
return large
amounts of
non-sensitive public data. The data is transferred over
the Internet. You need to be
able to detect if the
data was tampered with during transit. The
implementation must be
configurable at run
time. Your solution must minimize the impact on the
performance of the Web
service.
What should you do?
A. Configure the
virtual directory to require the Secure Sockets Layer (SSL)
protocol.
B. Apply Web Services
Enhancements (WSE) 3.0 security to the Web service that
is configured
to use an X.509
certificate with the Sign-Only protection level..
C. Apply Web Services
Enhancements (WSE) 3.0 security to the Web service that
is configured
to use an X.509
certificate with the Sign and Encrypt protection level.
D. Configure the
virtual directory that hosts the XML Web service to use
basic authentication.
Answer: B
Question: 2
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 = gcnew
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?
A. Add the following
code between lines 03 and 04.ws->SetPolicy("Secure");
Replace line 03 with
the following code.Math^ ws = gcnew Math();
B. Add the following
code between lines 03 and 04.UsernameToken^ u = gcnew
UsernameToken("userid",
"password");EncryptedKeyToken^ et = gcnew
EncryptedKeyToken(u);ws->SetClientCredential(et);
C. Add the following
code between lines 03 and 04.ws->UseDefaultCredentials =
true;
D. Add the following
code between lines 03 and 04.ws-
>SetPolicy("anonymousForCertificateSecurity");
Answer: A
Question: 3
You write a SOAP
extension to monitor a deployed Web service. You need to
deploy the SOAP
extension to the Web
service without requiring a change to the compiled
assemblies. You cannot
use reflection to
deploy the SOAP extension.
What should you do?
A. Write a class that
extends the SoapExtensionAttribute attribute, has the
AttributeTargets.Method
attribute applied, and returns an instance of the SOAP
extension in
the ExtensionType
property.
B. Extend the
SoapExtensionImporter class and reference the class by
using the
SoapExtensionTypeElement in the Web.config file.
C. Extend the
SoapExtension class. Override the Initialize method to
add the SOAP extension to
the Web service by
using the SoapExtensionReflector class.
D. Add the SOAP
extension to the Web service's Web service description
language (WSDL) by
using the
WsdlHelpGeneratorElement element in the Web.config file.
Answer: B
Question: 4
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?
A. Add the following
elements to the System.Web section of the Web.config
file.<httpModules><add
name="Session"
type="System.Web.SessionState.SessionStateModule"
/></httpModules>
B. In the client code
for the Web service's proxy object, assign a new
instance of the
System.Net.CookieContainer object to the CookieContainer
property.
C. Add the following
element to the System.Web section of the Web.config
file.<sessionState
mode="InProc" />
D. Modify the WebMethod
attribute in the Web service so that the EnableSession
property is set
to True.
Answer: D
Question: 5
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?
A. Set the
CacheDuration property on the WebMethod attribute of the
GetChart method to 60.
B. Set the
BufferResponse property on the WebMethod attribute of
the GetChart method to
False.
C. Set the
CacheDuration property on the WebMethod attribute of the
GetChart method to 1.
D. Set the
BufferResponse property on the WebMethod attribute of
the GetChart method to
True.
Answer: A
Question: 6
A Web service
application provides security data about employees to
applications that control
access to company
facilities. The Web service is accessed by using TCP and
is protected by
using Web Services
Enhancements (WSE) 3.0 security for message encryption.
The company
has added fingerprint
readers to grant employees access to the facilities.
Images of employee
fingerprints are
maintained by the Web service application. You need to
ensure that the existing
WSE security encryption
policy can be applied to the fingerprint image. Your
solution must
minimize the size of
the Web service message.
What should you do?
A. Configure the Web
service to use Message Transmission Optimization
Mechanism (MTOM)
to pass the binary
fingerprint image.
B. Configure the Web
service to use base64 encoding to pass the binary
fingerprint image.
C. Create a SOAP filter
to manage encryption for the message.
D. Create a SOAP
extension to manage encryption for the message.
Answer: A
Question: 7
An assembly named
SimpleMathLib is deployed to the Bin folder that is
under a virtual directory
named SimpleMathHost,
which is on an IIS server named SERVER1. The
SimpleMathLib
assembly contains the
following code.
Public Class
SimpleMathClass Inherits MarshalByRefObject
Public Function
Add(ByVal x As Double, ByVal y As Double) _ As Double
Return x + y
End Function
End Class
The Web.config file
under the SimpleMathHost virtual directory contains the
proper configuration
to host SimpleMath as a
remoting object. You write a client Co |