70-513 - TS: Windows Communication Foundation Development via MS. NET Framework 4
Number of Questions Included: 145
Updated: 2012-05-28
This dump is the collection composed by Lyudmyla of all unique questions from dumps of BOB, FSAN and WASP, with Darths corrections.
Add a DataProtectionPermission attribute to the CreditCardNumber property and set the ProtectData property to true.
Convert the DataContract to a MessageContract and set the ProtectionLevel property to SignAndEncrypt.
Change the data type of CreditCardNumber from string to SecureString.
Implement the CreditCardNumber property getter and setter In the setter, run the value of the CreditCardNumber through the MD5CryptoServiceProvider class TransformBlock method.
Binary message encoding
MTOM (Message Transmission Optimization Mechanism) message encoding
Text message encoding with message version set to none
Text message encoding with message version set to SOAP 1.2
Rate this question:
TcpTransport, windowsStreamSecurity, transactionFlow, binaryMessageEncoding
TransactionFlow, binaryMessageEncoding, windowsStreamSecurity, tcpTransport
WindowsStreamSecurity, tcpTransport, binaryMessageEncoding, transactionFlow
BinaryMessageEncoding, transactionFlow, tcpTransport, windowsStreamSecurity
Rate this question:
Add a MessageBodyMember attribute to the CodeName property and set the ProtectionLevel to Sign. Add a MessageBodyMember attribute to the SecretHandshake property and set the ProtectionLevel to EncryptAndSign.
Add a DataProtectionPermission attribute to the each property and set the ProtectData property to true.
Add an xmlText attribute to the CodeName property and set the DataType property to Signed. Add a PasswordPropertyText attribute to the SecretHandshake property and set its value to true.
Add an ImmutableObject attribute to the CodeName property and set its value property to true. Add a Browsable attribute to the SecretHandshake property and set its value to false.
Rate this question:
Create an asmx file and add a @ServiceHost directive to this file. Copy the file to the root of the application directory.
Create an .asmx file and add a @Register directive to this file. Copy the file to the bin directoyy of the application.
Create a svc file and add a @ServiceHost directive to this file. Copy the file to the root of the application directory.
Create a .svc file and add a @Register directive to this file. Copy the file to the bin directory of the application.
Rate this question:
Add the KnownType attribute to the data contract. Set a default value in each of the data member declarations.
Add the KnownType attribute to the data contract. Set the Order property of each data member to unique integer value.
Set the EmitDefaultValue property of each data member to false.
Set the lsRequired property of each data member to true.
Rate this question:
Set an etwTracking behavior on the service and configure a listener for the System.ServiceModel trace source.
Set an etwTracking behavior on the service and configure a listener for the System.ServiceModel.MessageLogging trace source.
Enable messageLogging in the System.ServiceModel diagnostics element configuration and configure a listener for the System.ServiceModel.MessageLogging trace source.
Enable messageLogging in the System.ServiceModel diagnostics element configuration and configure a listener for the System.ServiceModel trace source.
Rate this question:
Inside the ConfirmCreditCard method, surround the code that must participate in the transaction with a using(new TransactionScope()) block.
Inside the ConfirmCreditCard method, surround the code that must participate in the transaction with a using(new CommittableTransaction()) block.
Add an [OperationBehavior(TransactionScopeRequired=true)] attribute to the ConfirmCreditCard method.
Add an [OperationBehavior(TransactionAutoComplete=true)] attribute to the ConfirmCreditCard method.
Rate this question:
[ServiceContract(Namespace="Arithmetic")] public class Calculator { [Operation Contract(Action="Sum")] public int Add(int x, int y) {} }
[ServiceContract(ConfigurationName="Arithmetic")] public class Calculator { [Operation Contract(Action="Sum")] public int Add(int x, int y) {} }
[ServiceContract(Name="Arithmetic")] public class Calculator { [OperationContract(Name="Sum")] public int Add(int x, int y) {} }
[ServiceContract(Name="Arithmetic")] public class Calculator { [OperationContract(ReplyAction="Sum")] public int Add(int x, int y) {} }
Rate this question:
[OperationContract(IsOneWay=true, Action="*", ReplyAction="*")] void PostData(Order data);
[OperationContract(IsOneWay=true, Action="*", ReplyAction = "*")] void PostData(BodyWriter data);
[OperationContract] void PostData(BodyWriter data);
[OperationContract] void PostData(Message data);
Rate this question:
In the method body, check the Rights PosessesProperty property to see if it contains Manager
Add a PrincipalPermission attribute to the method and set the Roles property to Manager
Add a SecurityPermission attribute to the method and set the SecurityAction to Demand
In the method body, create a new instance of WindowsClaimSet. Use the FindClaims method to locate a claimType named Role with a right named Manager
Rate this question:
Set the authorizationManagerType attribute of the serviceAuthorization behavior to Message.
Set the includeExceptionDetailslnFaults attribute of the serviceDebug behavior to true.
Set the Mode attribute of the security configuration element to Message.
Set the messageAuthenticationAuditLevel attribute of the serviceSecurityAudit behavior to Failure.
Rate this question:
Implement the IChannelInitializer interface in the service class.
Implement the System.Runtime.Serialization.IFormatterConverter interface in the service class.
Set the BodyStyle parameter of the WebGet attribute on the operation to WebMessageBodyStyle.WrappedResponse.
Set the retum type of the operation to System.ServiceModel.Channels.Message. Use the current WebOperationContext methods to return the data in the required format.
The value of the maxBufferPoolSize attribute to 5242880
The value of the maxReceivedMessageSize attribute to 5242880
The value of the maxBytesPerRead attribute to 5242880
The value of the maxBufferSize attribute to 5242880
Rate this question:
Set the ProtectionLevel property in line 01 to EncryptAndSign.
Set the ProtectionLevel property in line 04 and line 06 to Sign.
Add a SecurityCriticalAttribute ror each operation.
Add a SecunitySafeCriticalAttribute for each operation.
Rate this question:
In the application configuration file on the client, add the following XML segment to the system.serviceModel/behaviors configuration section group. Associate the debug behavior with any endpoints that need to return exception details.
In the application configuration file on the service and all the clients, add the following XML segment to the system.diagnostics/sources configuration section group.
Apply the following attribute to the ContosoService class. [ServiceBehavior(IncludeExceptionDetailInFaults = true)]
For each OperationContract exposed by lContosoService, apply the following attribute. [FaultContract(typeof(Exception))]
Rate this question:
ICommunicationObject
IExtension
IExtensibleObject
IExtensibleDataObject
Rate this question:
Set the value of ServiceSecurityContext.Current.WindowsIdentity.ImpersonationLevel to TokenlmpersonationLevel.Impersonation
Set the value of ServiceSecurityContext.Current.Windowsldentity.ImpersonationLevel to TokenlmpersonationLevel.Delegation
Set the PrincipalPermissionAttribute on the service contract and update the binding attribute in the endpoint element of the configuration file to wsHttpBinding
Set the PnncipalPermissionAttribute on the service contract and update the bindingConfiguration attribute in the endpoint element of the configuration file to wsHttpBinding
Rate this question:
Add a net.tcp base address to the host.
Add an endpoint configured with a netTcpBinding.
Add an endpoint behavior named netTcpBehavior to the existing endpoint.
Add a binding configuration to the existing endpoint named netTcpBinding.
Rate this question:
Replace line 14 with the following line: throw;
Replace line 14 with the following line: throw new FaultException(anOrder, ex.ToString());
After line 05, add the following line: [FaultContract(typeof(FaultException))] Replace line 14 with the following line: throw ex;
Alter line 05, add the following line: [FaultContract(typeof(FaultException))] Replace line 14 with the following line: throw new FaultException(anOrder, "Divide by zero exception");
Rate this question:
[ServiceBehavior(lnstanceContextMode = lnstanceContextMode.PerSession, ConcurrencyMode = ConcurrencyMode.Single)]
[ServiceBehavior(lnstanceContextMode = lnstanceContextMode.PerCall, ConcurrencyMode = ConcurrencyMode.Reentrant)]
[ServiceBehavior(InstanceContextMode = lnstanceContextMode.PerSession, ConcurrencyMode = ConcurrencyMode.Multiple)]
[ServiceBehavior(lnstanceContextMode = lnstanceContextMode.PerCall, ConcurrencyMode = ConcurrencyMode.Multiple)]
Rate this question:
Insert the following attribute to OperationOne on lContosoService [TransactionFlow(TransactionFlowOption.Mandatory)] Insert the following attribute to OperationTwo on IContosoService [TransactionFlow(TransactionFlowOption.Mandatory)]
Insert the following attribute to OperationOne on ContosoService [OperationBehavior(TransactonScopeRequired=true, TransactionAutoComplete=false)] Insert the following attribute to OperationTwo on ContosoService. [OperationBehavior(TransactionScopeRequired=true, TransactionAutoComplete=true)]
Add the following XML segment to the application config file in the system serviceModel/bindings configuration section Then use the NetMsmqBinding named contosoTx to listen for messages from the clients.
Add the following XML segment to the application config file in the systemserviceModel/bindings configuration section. Then use the CustommiBinding named contosoTx to listen fcw messages from the clients.
Rate this question:
Increase the value of maxReceivedMessageSize on the endpoint binding.
Increase the value of maxRequestLength on the httpRuntime element.
Increase the value of maxBufferSize on the endpoint binding.
Increase the value of maxBufferPoolSize on the endpoint binding.
Rate this question:
NetTcpContextBinding
BasicHttpContextBinding
NetTcpBinding
NetMsmqBinding
Rate this question:
Host = new ServiceHost("MyApplication.DataAccessService");
Host = new ServiceHost("MyApplication.DataAccess");
Host = new ServiceHost(typeof(IDataAccess));
Host = new ServiceHost(typeof(DataAccessService));
Rate this question:
Change line 03 as follows: typeof(IRequestReplyRouter),
Change line 03 as follows: typeof(IDuplexSessionRouter),
Change line 10 as follows: typeof(IRequestReplyRouter)
Change line 10 as follows: typeof(IDuplexSessionRouter)
Rate this question:
On the OperationContractAttribute, set the AsyncPattern property value to true.
On the OperationContractAttribute, set the ReplyAction property value to the endpoint address of the client.
On the client, create a proxy derived from DuplexClientBase.
On the client, use GetCallbackChannel.
Rate this question:
Catch and handle both TimeoutFaultException and FaultException.
Catch both TimeoutFaultException and FaultException. Create a new channel in both cases.
Catch and handle TimeoutFaultException. Catch FaultException and create a new channel.
Catch and handle FaultException. Catch TimeoutFaultException and create a new channel.
Rate this question:
Routing
ServiceDebug
ServiceSecurityAudit
WorkflowUnhandledException
Rate this question:
Update the service contract to read as follows. [ServiceContract(SessionMode=SessionMode.Required)] Add the following behavior to the service implementation [ServiceBehavior(InstanceContextMode=InstanceContextMode.PerSession)]
Update the service contract to read as follows. [ServiceContract(SessionMode=SessionMode.Allowed)] Add the following behavior to the service implementation. [ServiceBehavior(InstanceContextMode=InstanceContextMode.Single, ReleaseServiceInstanceOnTransactionComplete=false)]
Update the service contract to read as follows [ServiceContract(SessionMode=SessionMode.Allowed)] Add the followng behavior to the service implementation. [ServiceBehavior(InstanceContextMode=InstanceContextMode.Single)]
Update the service contract to read as follows. [ServiceContract(SessionMode=SessionMode.Required)] Add the following behavior to the service implementation. [ServiceBehavior(InstanceContextMode=InstanceContextMode.PerCall)]
Rate this question:
AnnouncementService
AnnouncementClient
DiscoveryClient
HttpListener
Rate this question:
[OperationContract] [WebInvoke(Method="POST")] string Operation1(string s);
[OperationContract] [WebGet(UriTemplate="POST")] string Operation1(string s);
[OperationContract(ReplyAction="POST")] string Operation1(string s);
[OperationContract(Action="POST")] string Operation1(string s);
Rate this question:
ChannelFactory factory = new ChannelFactory("Contoso.IContoso");
ChannelFactory factory = new ChannelFactory("netNamedPipeBinding");
ChannelFactory factory = new ChannelFactory("netPipe");
ChannelFactory factory = new ChannelFactory("net.pipe//localhost/ContosoService");
Rate this question:
A message filter with a priority of 100 that will forward messages that total between $0 and $500 to Service A
A message filter with a priority of 0 that will forward messages that total between $0 and $500 to Service A
A message filter with a priority of 0 that will forward all messages to Service B
A message filter with a priority of 100 that will forward all messages to Service B
Rate this question:
Net.msmq://localhost/msmq$FailedMessages
Net.msmq://localhost/msmq$DeadLetter
Net.msmq://localhost/system$DeadXact
Net.msmq://localhost/system$DeadLetter
Rate this question:
In the client configuration, change the value of the address attribute to net.tcp://www.contoso.com/MyService
In the client configuration, change the value of the address attribute to net.tcp://www.contoso.com/MyService listen=http://www.contoso.com/MyService.
After instantiating the client and before invoking any service operation, add this line of code. EndpointBehaviors.Add(new EndpointDiscoveryBehavior(){ Enabled = true });
After instantiating the client and before invoking any service operation, add this line of code. client.Endpoint.Behaviors.Add(new ClientViaBehavior(new Uri("net.tcp://www.contoso.com/IMyService")));
Rate this question:
DataContractSerializer s = new DataContractSerializer(typeof(Item)); Item item = s.ReadObject(response.GetResponseStream()) as Item;
BinaryFormatter f = new BinaryFormatter(); Item item = f.Deserialize(response.GetResponseStream() as Item;
XmlDictionaryReader r = JsonReaderWriterFactory.CreateJsonReader(response.GetResponseStream(), XmlDictionaryReaderQuotas.Max); DataContractSerializer s = new DataContractSerializer(typeof(Item)); Item item = s.ReadObject(r) as Item;
DataContractJsonSerializer s = new DataContractJsonSerializer(typeof(Item)); Item item = s.ReadObject(response.GetResponseStream()) as Item;
Rate this question:
ConsoleWriteLine(item.Content.Type); ConsoleWriteLine(((TextSyndicationContent)item.Content).Text);
Console.WriteLine(item.Content.GetType()); Console.WriteLine(((TextSyndicationContent)item.Content).Text);
Console.WriteLine(item.Content.Type); Console.WriteLine(item.Content.ToString());
Console.WriteLine(item.Content.GetType()); Console.WriteLine(item.Content.ToString());
Rate this question:
Add the following attribute to the TeamMessageService class, before line 10. [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single)]
Add the following attribute to the TeamMessageService class, before line 10. [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerSession)] Then change the binding definition on the service at line 25, and on the client to the following WSHttpBinding binding = new WSHttpBinding(SecurityMode.None); binding.ReliableSession.Enabled = true;
Pass a service instance to the instancing code in line 24, as follows. ServiceHost host = new ServiceHost(new TeamMessageService());
Redefine the message string in line 13, as follows static string message = "Today's Message"; Then change the implementation of PutMessage in lines 19-22 to the following public void PutMessage(string message) { TeamMessageServiceMessage.PutMessage; }
Rate this question:
ChannelFactory
ServiceHost
ClientRuntime
CommunicationObject
Rate this question:
Change line 25 to the following code segment: DuplexChannelFactory factory = new DuplexChannelFactory(callbackContext, binding, address);
Change line 26 to the following code segment: IGreetingService greetingServicefactory = CreateChannel(callbackContext);
Add the following code segment after line 26: callbackContext.IncomingChannels.Add((IDuplexChannel)greetingService);
Add the following code segment after line 26: callbackContext.OutgoingChannels.Add((IDuplexChannel)greetingService);
Rate this question:
Use the GetBody method of the Message class to read the content of the messages.
Use the CreateBufferedCopy method of the Message class to load the messages into memory.
Use the WriteBodyContents method of the BodyWriter class to make a copy of the messages.
Use the CreateMessage method of the MessageBuffer class to make a copy of the messages.
Rate this question:
Define binding2 as follows: WS2007HttpBinding binding2 = new WS2007HttpBinding(SecurityMode.None); Configure binding2 as follows: binding2.ReliableSession.Enabled = true;
Define binding2 as follows: WSHttpBinding binding2 = new WSHttpBinding(SecurityMode.None); Add the following behavior to the service implementation: [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerSession)]
Define binding2 as follows: BasicHttpBinding binding2 = new BasicHttpBinding(BasicHttpSecurityMode.None); Enable cookies for binding2. binding2.AllowCookies = true:
Define binding2 as follows: BasicHttpBinding binding2 = new BasicHttpBinding(BasicHttpSecurityMode.None); Add the following behavior to the service implementation: [ServiceBehavior(InstanceContexMode = InstanceContextMode.Single)]
$get(String.format("/Catalogsvc/Catalog/Items/id{0}", itemId) null, function (data) { ... }, javascript");
$get(String.format("/Catalogsvc/Catalog/Items/{0}", itemId), null, function (data) { ... }, "json");
$get(String.format("/Catalogsvc/Catalog/Items/{0}", itemld), null, function (data) { ... }, "xml");
$get(String.format("/Catalogsvc/Catalog/Items/id{0}", itemld), null, function (data) { ... }, "json");
Rate this question:
Replace the service interface with the following interface and implement the new methods. [ServiceContract] public interface IDoSomething { [OperationContract] string DoLongOperation(); [OperationContract(AsyncPattern = true)] IAsyncResult BeginDoLongOperation(); [OperationContract(AsyncPattern = true)] string EndDoLongOperation(IAsyncResult result); }
Replace the service interface with the following interface and implement the new methods. [ServiceContract] public interface IDoSomething { [OperationContract(AsyncPattern = true)] IAsyncResult BeginDoLongOperation(); [OperationContract(AsyncPattern = true)] string EndDoLongOperation(IAsyncResult result); }
Generate a proxy class with asynchronous methods and use it for the new clients.
Add a new endpoint to the service that uses a full-duplex binding and use it for the new clients.
Rate this question:
In the application configuration file, add the IogKnownPii attribute to the message logging diagnostics source and set the value of the attribute to true. Generate the ContosoService class using the Add Service Reference wizard. Add a reference to System.ServiceModel.Routing.dll. Add the following code segment: ContosoService client = new ContosoService(); SoapProcessingBehavior behavior = new SoapProcessingBehavior(); behavior.ProcessMessages = true; client.Endpoint.Behaviors.Add(behavior);
In the application configuration file, add the following XML segment to the system.serviceModel configuration section group.
In the machine configuration file, add the following XML segment to the system.serviceModel configuration section. Generate the ContosoService class using the Add Service Reference wizard. Add the following code segment. ContosoService client = new ContosoService(); client.Endpoint.Behaviors.Add(new CallbackDebugBehavior(true));
In the machine configuration file, add the following XML segment to the system.serviceModel configuration section. In the application configuration file, add the IogKnownPii attribute to the message logging diagnostics source and set the value of the attribute to true. In the application configuration file, add the following XML segment to the system.serviceModel configuration section group.
Rate this question:
Within the service configuration, add a ServiceAuthorization behavior to the service, and set ImpersonateCallerForAllOperations to true.
Within the service configuration, add a ServiceAuthenticationManager behavior to the service, and set ServiceAuthenticationManagerType to Impersonate.
Within the service configuration, add a serviceSecurityAudit behavior to the service, and set serviceAuthorizationAuditLevel to SuccessOrFailure.
Within the service configuration, add a ServiceCredentials behavior to the service, and set type to Impersonate.
Rate this question:
Add the following attributes to the SavePerson operation on IContosoService. [OperationBehavior(TransactionScope.Required = true)] [TransactionFlow(TransactionFlowOption.Mandatory)]
Add the following attributes to the SavePerson operation on lContosoService [TransactionFlow(TransactionFlowOption.Mandatory)] [OperationBehavior(TransactionScope.Required = true)]
Add the following attribute to the SavePerson operation on lContosoService [OperationBehavior(TransactionScope.Required = true)] Add the following attribute to the implementation of SavePerson. [TransactionFlow(TransactionFlowOption.Allowed)]
Add the following attribute to the SavePerson operation on lContosoService [TransactionFlow(TransactionFlowOption.Allowed)] Add the following attribute to the implementation of SavePerson. [OperationBehavior(TransactionScope.Required = true)]
Rate this question:
Quiz Review Timeline (Updated): Oct 29, 2024 +
Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.
WCF Test For A1307L
The WCF Test For A1307L assesses knowledge of Windows Communication Foundation (WCF), focusing on components like WCF Runtime, Endpoint, and ChannelFactory. It evaluates...
Questions:
10 |
Attempts:
107 |
Last updated:
Jul 17, 2024
|
Microsoft Azure IoT Certification Exam Prep Test
Prepare for the Microsoft Azure IoT Certification Exam with this targeted prep test. Covering key components like IoT Hub, Device Provisioning Service, and practical scenarios for...
Questions:
61 |
Attempts:
342 |
Last updated:
Mar 22, 2023
|
|
Oracle Certified Java Associate Exam Quiz!
This Oracle Certified Java Associate Exam Quiz assesses knowledge in Java programming and its principles. It tests code comprehension, error handling, and understanding of...
Questions:
60 |
Attempts:
363 |
Last updated:
Jan 22, 2024
|
Certified Human Resource Business Partner (CHRBP) Course (Module 6), Sept. 5 2020
Certified Human Resource Business Partner (CHRBP) Course (Module 6) Designing Succession Plan Assessment (Individual, MCQs)
(30 Marks, 20-minute assessment, Q1...
Questions:
10 |
Attempts:
248 |
Last updated:
Jan 25, 2023
|
ApprovalMax Partner Certification Test
The ApprovalMax Partner Certification Test assesses knowledge on ApprovalMax's approval workflows for financial documents like supplier invoices. It evaluates the ability to...
Questions:
6 |
Attempts:
238 |
Last updated:
May 29, 2024
|
MS-101: Microsoft 365 Mobility And Security
The actual exam questions based on the excellent "Examtopics" website: https://www.examtopics.com/exams/microsoft/ms-101/view/1/
Questions:
129 |
Attempts:
241 |
Last updated:
Aug 10, 2024
|
|
Wait!
Here's an interesting quiz for you.