PrepAway - Latest Free Exam Questions & Answers

Author: seenagape

Which code segment should you use at line 10?

You are working with a Windows Communication Foundation (WCF) client application that
has a generated proxy named SampleServiceProxy. When the client application is
executing, in line 02 of the following code, the channel faults (Line numbers are included for
reference only.) 01 SampleServiceProxy proxy new SampleServiceProxy() 02try 03{
04proxy Processlnvoice(invoice); 05) 06catch 07{ 08 (proxy. State == CommunicationState.
Faulted) 09{ 10 11) 12) 13 proxy Update Customer(customer); You need to retumn proxy to
a state in which it can successfully execute the call in line 13. Which code segment should
you use at line 10?

You need to ensure that all calls to Operation 1 and Operation2 from the client are encrypted and signed

A Windows Communication Foundation (WCF) client uses the following service contract.
(Line numbers are included for reference only.) 01 [ServiceContract] 02 public interface
IService 03 ( 04 [OperationContractj 05 string Operation1O; 06 [OperationContract] 07
string Operation2(), 08) You need to ensure that all calls to Operation 1 and Operation2
from the client are encrypted and signed. What should you do?

You need to ensure that all clients calling GetMessage will retrieve the same string, even if the message is u

A Windows Communication Foundation (WCF) solution uses the following contract to share
a message across its clients. (Line numbers are included for reference only.) 01
[ServiceContract] 02public interface ITeamMessageService 03{ 04 [OperationContract]
05string GetMessage0;n 06 07 [OperationContract] 08void PutMessage(string message);
09) The code for the service class is as follows 10 public class TeamMessageService:
ITeamMessageService 1 1{ 12Guid key = GuicLNewGuidO; 1 3string message = “Today’s
Message”: 1 4public string GetMessage() i5{ 16 return stringFormat(”Message:{0} Key:{1}”,
message, Key); 1n 18 1 9public void PutMessage(string message) 20{ 2lthismessage =
message; 22} 23) The senvice is self-hosted. The hosting code is as follows. 24
ServiceHost host = 25BasicHttpBinding binding = new

BasicHttpBinding(BasicHttpSecuntyMode.None): 26 host AddServiceEndpoint(
HMyApplication lTeamMessageService, binding, “http:/Ilocalhost: 12345w); 27 host Open0;)
You need to ensure that all clients calling GetMessage will retrieve the same string, even if
the message is updated by clients calling PutMessage. What should you do?

You need to complete the implementation and ensure that the session-based counter will perform over HTTP as it

A Windows Communication Foundation (WCF) solution provides a session-based counter.
The service is self-hosted. The hosting code is as follows. Dim host As ServiceHost = New
ServiceHost(GetType(CounterService)) Dim bnding As NetTcpBinding = New
NetTcpBinding(SecurityMode.None) host.AddServiceEndpoint(”MyApplication.
ICounterService”, binding, “net.tcp://localhost:23456”) host. Open() This service is currently
exposed over TCP, but needs to be exposed to external clients over HTTP. Therefore, a
new service endpoint is created with the following code.
host.AddServiceEndpoint(‘’MyApplication. lCounterService”, binding2,
“http:/!localhost:12345’ You need to complete the implementation and ensure that the
session-based counter will perform over HTTP as it does over TCP. What should you do?

What should you do?

A Windows Communication Foundation (WCF) solution uses the following contract to share
a message across its clients (Line numbers are included for reference only) 01
<ServiceContract0> 02PuElic Interface ITeamMessageService 03 04
<OperationContractO> 05Function GetMessage() As String 06 07 <OperationContract0>
08Sub PutMessage(Byval message As String) O9End Interface The code for the serAce
class is as follows. 10 Public Class TeamMessageService0 11 Implements

lTearmt4essageService 12 1 3Dim key As Guid = Guid.NewGuid() 1 4Dim message As
String = “Today’s Message’ 15 16PuUic Function GetMessage0As String – 1 7lmpements
lTearm*AessageServiceGetMessage 18 1 9Retun String. Fommat(”Message:{0) Key:{ 1}”,
message, key) 20End Function 21 22PubIic Sub PutMessage(ByV message As Stnng) –
23lmpements lTearrlessageService PutMessage 24 25Me message = message 26End Sub
27 28End Class The service is self-hosted The hosting code rs as follows 29Dim host As
ServiceHost = New ServiceHost(GetType(TearrwiessageSeMce))? 3ODim binding As Basic
HttpBindngt New BasicHttpBindiig(BasicHttpSecurityMode. None) 31
host.AddServiceEndpoint( “MyAppication lTearrtAessageService”, binding Thttp /Ilac aihost.
1 2345) 32host Open() You need to ensure that all clients calling GetMessage will retrieve
the same string, even if the message is upd(ed by clients calling PutMessage what should
you do?

Which Transact-SQL statement should you use?

You develop a Microsoft SQL Server 2012 server database that supports an application. The
application contains a table that has the following definition:
CREATE TABLE Inventory
(ItemID int NOT NULL PRIMARY KEY,
ItemsInStore int NOT NULL,
ItemsInWarehouse int NOT NULL)
You need to create a computed column that returns the sum total of the ItemsInStore and
ItemsInWarehouse values for each row.
Which Transact-SQL statement should you use?

Which two SQL Server components should you use?

You are a database solutions architect. Your company plans to develop a solution by using
a SQL Server 2008 instance. The solution has the following business requirements: ·Import
data from various data sources such as Microsoft Office Excel, Microsoft SQL Server 2000,
Microsoft SQL Server 2005, and CSV files. ·Profile the source data before it is imported.
·Provide collaboration and offline capabilities to mobile users. ·Allow mobile users to use
heterogeneous data stores. You need to configure the appropriate SQL Server components
to accomplish the business requirements. You want to achieve this goal by using the
minimum amount of administrative effort. Which two SQL Server components should you
use? (Each correct answer presents part of the solution. Choose two.)

Which storage configuration should you use?

You administer a SQL Server 2008 instance. You plan to deploy a new database that has
the following capacity requirements: 275 GB for the database data file 50 GB for the
transaction log file The storage array has six 100-GB disk drives available for the database.
The disks are attached to a redundant array of independent disks (RAID) controller that
supports RAID levels 0, 1, 5, and 10. The write performance of the transaction log needs to
be maximized. The database and transaction log files must be protected in the event of a
drive failure. You need to design the storage system. Which storage configuration should
you use?