Category: Microsoft Visual Studio 2012

Microsoft 70-513 Test,Most Reliable Microsoft 70-513 Certificate With The Knowledge And Skills

GOOD NEWS: All the new Microsoft 70-513 exam questions and answers can get in VCE and PDF format for free on Flydumps.com With Flydumps Microsoft 70-513 practice tests, you will pass the exam easily! Free download Microsoft 70-513 exam questions vce player all the time.

Exam A
QUESTION 1
You are developing a Windows Communication Foundation (WCF) service named CalculatorService, which implements the ICalculatorService contract. The service is configured to be discoverable through UDP. CalculatorService contains multiple endpoints. One of the endpoints is configured with the following behavior.

You need to log all the endpoint metadata information that is added by the service host. Which code segment should you use?

Correct Answer: A QUESTION 2
You have an existing Windows Communication Foundation (WCF) service. You need to ensure that other services are notified when the service is started. What should you do?
A. Add the following standard endpoint to the service. <endpoint name=”udpAnnouncementEndpoint” kind=”udpDiscoveryEndpoint” />
B. Add the following standard endpoint to the service.
<endpoint name=”udpDiscoveryEndpoint”
kind=”udpAnnouncementEndpoint” />
C. Add a service behavior with the following element. <serviceDiscovery> <announcementEndpoints> <endpoint kind=”udpDiscoveryEndpoint” /> </announcementEndpoints> </serviceDiscovery>
D. Add a service behavior with the following element. <serviceDiscovery> <announcementEndpoints> <endpoint kind=”udpAnnouncementEndpoint” /> </announcementEndpoints> </serviceDiscovery>

Correct Answer: D
QUESTION 3
You develop a Windows Communication Foundation (WCF) service. You enable all performance counters and run multiple calls to the service.
The service must isolate session data for each user.
You need to monitor the instancing behavior used in the service.
Which performance counter should you monitor?
A. ServiceModelService 4.0.0.0\Calls
B. ServiceModelService 4.0.0.0\Instances
C. ASP.NET State Service\State Server Sessions Active
D. ASP.NET State Service\State Server Sessions Total
Correct Answer: B
QUESTION 4
You develop a Windows Communication Foundation (WCF) service.
You name the service MovieService in the Movie namespace. The service is hosted in Microsoft Internet Information Services (IIS).
You copy the assembly containing the service to the bin folder in the virtual directory path.
You need to set up the URI that is mapped to the service.
What should you do?
A. Add the following code segment to the web.config file. <serviceHostingEnvironment> <serviceActivations> odd relativeAddress=”./Movie” service=”Movie.MovieService”/> </serviceAct ivations> </serviceHostingEnvironment>
B. Add a Movie.svc file in the root of the virtual path with the following line. <%8ServiceHost language=”C#” Service=”MovieService”*>
C. Add the following code segment to the web.config file. <serviceHostingEnvironment> <serviceActivations> odd relativeAddress=” . /Movie, svc” service=”Hovie.MovieService”/> </serviceActivations> </serviceHostingEnvirorunent>
D. Add a Movie.svc file in the root of the virtual path with the following line. <%8ServiceHost language=”C#” Service=”MovieService.svc”%>
Correct Answer: B Exam B

QUESTION 1
A Windows Communication Foundation (WCF) service that handles corporate accounting must be changed to comply with government regulations of auditing and accountability.
You need to configure the WCF service to execute under the Windows logged-on identity of the calling application.
What should you do?
A. Within the service configuration, add a serviceAuthorization behavior to the service, and set impersonateCallerForAllOperations to true.
B. Within the service configuration, add a serviceAuthenticationManager behavior to the service, and set serviceAuthenticationManagerType to Impersonate.
C. Within the service configuration, add a serviceSecurityAudit behavior to the service, and set serviceAuthorizationAuditLevel to SuccessOrFailure.
D. Within the service configuration, add a serviceCredentials behavior to the service, and set type to Impersonate.
Correct Answer: A
QUESTION 2
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()>
02 Public Interface ITeamMessageService
03
04 <OperationContract()>
05 Function GetMessage() As String
06
07 <OperationContract()>
08 Sub PutMessage(ByVal message As String)
09 End Interface
The code for the service class is as follows.
10 Public Class TeamMessageService
11 Implements ITeamMessageService
12
13 Dim key As Guid = Guid.NewGuid()
14 Dim message As String = “Today s Message”
15
16 Public Function GetMessage() As String _
17 Implements ITeamMessageService.GetMessage
18
19 Return String.Format(“Message:{0}. Key:{1}”, message, key)
20 End Function
21
22 Public Sub PutMessage(ByVal message As String) _
23 Implements ITeamMessageService.PutMessage
24
25 Me.message = message
26 End Sub
27
28 End Class
The service is self-hosted. The hosting code is as follows.
29 Dim host As ServiceHost =
New ServiceHost(GetType(TeamMessageService))
30 Dim binding As BasicHttpBinding =
New BasicHttpBinding(BasicHttpSecurityMode.None)
31 host.AddServiceEndpoint(
“MyApplication.ITeamMessageService”, binding,
“http://localhost:12345”)
32 host.Open()
You need to ensure that all clients calling GetMessage will retrieve the updated string if the message is updated by any client calling PutMessage.

What should you do?

A. Add the following attribute to the TeamMessageService class, before line 10. <ServiceBehavior(InstanceContextMode:=InstanceContextMode.Single)>
B. Add the following attribute to the TeamMessageService class, before line 10002E <ServiceBehavior(InstanceContextMode:= InstanceContextMode.PerSession)>
C. Pass a service instance to the instancing code in line 29, as follows. Dim host As ServiceHost = New ServiceHost(New TeamMessageService())
D. Redefine the message string in line 14, as follows. Shared message As String = “Today s Message”
E. Then change the implementation of PutMessage in lines 22-26 to the following. Public Sub PutMessage(ByVal message As String) _ Implements ITeamMessageService.PutMessage TeamMessageService.message = message End Sub
Correct Answer: A
QUESTION 3
You are creating a Window s Communication Foundation (WCF) service application. The application needs to service many clients and requests simultaneously.
The application also needs to ensure subsequent individual client requests provide a stateful conversation.
You need to configure the service to support these requirements.
Which attribute should you add to the class that is implementing the service?
A. [ ServiceBehavior ( InstanceContextMode = InstanceContextMode.PerSession, ConcurrencyMode = ConcurrencyMode.Single )]
B. [ ServiceBehavior ( InstanceContextMode = InstanceContextMode.PerCall,
ConcurrencyMode = ConcurrencyMode.Reentrant )]
C. [ ServiceBehavior ( InstanceContextMode = InstanceContextMode.PerSession, ConcurrencyMode = ConcurrencyMode.Multiple )]
D. [ ServiceBehavior ( InstanceContextMode = InstanceContextMode.PerCall, ConcurrencyMode = ConcurrencyMode.Multiple )]
Correct Answer: C
QUESTION 4
You are configuring services to be discoverable. The services must be discoverable without relying on a central server. Client applications that consume the
services are on a network segment that is separate from the network segment that the services are located on.
A firewall blocks all TCP ports between the two network segments, but allows other protocols to pass through.
You need to ensure that the client applications can discover the services.
What should you do?

A. Use ad-hoc discovery mode over HTTP.
B. Use ad-hoc discovery mode over UDP.
C. Use managed discovery mode over HTTP.
D. Use managed discovery mode over UDP.
Correct Answer: B QUESTION 5
You need to modify a client application that consumes a Windows Communication Foundation (WCF) service.
The service metadata is no longer available.
You need to modify the previously generated proxy to include asynchronous calls to the service.
What should you do?

A. Update the service reference with the Generate asynchronous operations option.
B. Create a partial class for the previously generated proxy and include the new asynchronous methods.
C. Create a class with the same name as the previously generated proxy and add the new asynchronous methods. Add the new class to a namespace that is different from the original proxy.
D. Create a class with the same name as the previously generated proxy and add the new asynchronous methods as partial methods. Add the new class to a namespace that is different from the original proxy.

Correct Answer: B QUESTION 6
You develop a Windows Communication Foundation (WCF) service. It is used exclusively as an intranet application and is currently unsecured.
You need to ensure that the service meets the following requirements:
The service now must be exposed as an Internet application. The service must be secured at the transport level. Impersonation and delegation cannot be enabled.
What should you use?

A. wsHttpBinding and HTTPS
B. basicHttpBinding and Kerberos
C. basicHttpBinding and HTTP
D. wsHttpBinding and Kerberos

Correct Answer: A QUESTION 7
You are developing a Windows Communication Foundation (WCF) service.
You need to enable security auditing for all events.
What should you do?

A. Set the serviceAuthorizationAuditLevel setting to Success and the messageAuthenticationAuditLevel setting to Success.
B. Set the messageAuthenticationAuditLevel setting to Success and the auditLogLocation setting to Application.
C. Set the serviceAuthorizationAuditLevel setting to SuccessAndFailure and the messageAuthenticationAuditLevel setting to SuccessAndFailure.
D. Set the messageAuthenticationAuditLevel setting to SuccessAndFailure and the auditLogLocation setting to Security.

Correct Answer: C QUESTION 8
You are developing a Windows Communication Foundation (WCF) service. You enable logging in the configuration file. The opening tag is defined as follows.

You need to ensure that logging is implemented so that only messages with SOAP headers are logged. What should you add to the filters element of the application configuration file?
Correct Answer: C QUESTION 9
You develop a Windows Communication Foundation (WCF) service. You enable all performance counters and run multiple calls to the service.
The service must isolate session data for each user.
You need to monitor the instancing behavior used in the service.
Which performance counter should you monitor?

A. ServiceModelService 4.0.0.0\Calls
B. ServiceModelService 4.0.0.0\Instances
C. ASP.NET State Service\State Server Sessions Active
D. ASP.NET State Service\State Server Sessions Total

Correct Answer: B QUESTION 10
A service implements the following contract. (Line numbers are included for reference only.)

The service is implemented as follows.

ContosoService uses NetMsmqBinding to listen for messages. The queue was set up to use transactions for adding and removing messages.
You need to ensure that OperationOne and OperationTwo execute under the same transaction context when they are invoked in the same session.
What should you do?
A. Insert the following attribute to OperationOne on IContosoService. <TransactionFlow(TransactionFlowOption.Mandatory)> Insert the following attribute to OperationTwo on IContosoService. <TransactionFlow(TransactionFlowOption.Mandatory)>
B. Insert the following attribute to OperationOne on ContosoService. <OperationBehavior( TransactionScopeRequired:=True, TransactionAutoComplete:=False)> Insert the following attribute to OperationTwo on ContosoService. <OperationBehavior (TransactionScopeRequired:=True, TransactionAutoComplete:=True)>
C. Add the following XML segment to the application config file in the system.serviceModel/bindings configuration section. <netMsmqBinding> <binding name=”contosoTx” durable=”true” receiveContextEnabled=”true” /> </netMsmqBinding> Then use the NetMsmqBinding named contosoTx to listen for messages from the clients.
D. Add the following XML segment to the application config file in the system.serviceModel/bindings configuration section. <customBinding> <binding name=”contosoTx”> <transactionFlow /> <binaryMessageEncoding /> <msmqTransport durable=”true” /> </binding> </customBinding> Then use the CustomBinding named contosoTx to listen for messages from the clients.

Correct Answer: B
QUESTION 11
You are developing a Windows Service. The Windows Service will host a Windows Communication Foundation (WCF) service.
The Windows Service class will inherit from ServiceBase.
You need to ensure that the WCF service starts when the Windows Service is restarted.
What should you do in the Windows Service class?
A. Create a public method named Main. Create a new ServiceHost in the Main method. Override the OnShutdown method and close the ServiceHost.
B. Override the OnStart method and create and open a new ServiceHost. Override the OnStop method and close the ServiceHost.
C. Override the OnPowerEvent method and open a new ServiceHost. Override the OnShutdown method and close the ServiceHost.
D. Override the OnContinue method and open a new ServiceHost. Override the OnStop method and close the ServiceHost.
Correct Answer: B
QUESTION 12
You develop a Windows Communication Foundation (WCF) service that contains the following code segment. (Line numbers are included for reference only.)

You need to ensure that all service endpoints are available to client applications. Which code segment should you insert at line 04?

Correct Answer: C
QUESTION 13
You are modifying a Windows Communication Foundation (WCF) service that allows customers to update financial data. The service currently requires a transaction from the client application and is working correctly. The service contract is defined as follows. (Line numbers are included for reference only.)

The service must be modified so that client applications do not need to initiate a transaction when calling the operation. The service must use the client
application’s transaction if one is available. Otherwise it must use its own transaction.
You need to ensure that the service operation is always executed within a transaction.
What should you do?
Correct Answer: D QUESTION 14
You have a Windows Communication Foundation (WCF) service.

The service has issues with performance when it receives messages on a specific endpoint. The service must collect the minimum number of performance
counters to diagnose the message issues.
You need to configure the service.
In the web.config file for the service, what should you do?

A. In the service configuration diagnostics section, set the value of the performancCounters property to All.
B. Enable message logging for the endpoint.
C. Enable the Windows Management Instrumentation (WMI) provider.
D. In the service configuration diagnostics section, set the value of the performanceCounters property to ServiceOnly.

Correct Answer: A QUESTION 15
You are creating a windows Communication Foundation (WCF) service to process orders.
The data contract for the order is defined as follows:
[DataContract]
public class Order
{

[DataMemberl
public string CardHolderName { get; set;

[DataMember]
public string CreditCardNumber { get; set; }
}
You have the following requirements
Enable the transmission of the contents of Order from the clients to the service. Ensure that the contents of CreditCardNumber are not sent across the network in

clear text.
Ensure that the contents of CreditCardNumber are accessible by the service to process the order.
You need to implement the service to meet these requirements.
What should you do?

A. Add a DataProtectionPermission attribute to the CreditCardNumber property and set the ProtectData property to true.
B. Convert the DataContract to a MessageContract and set the ProtectionLevel property to SignAndEncrypt
C. Change the data type of CreditCardNumber from string to SecureString
D. Implement the CreditCardNumber property getter and setter. In the setter, run the value of the CreditCardNumber through the MD5CryptoServiceProvider class TransformBlock method

Correct Answer: B QUESTION 16
You are hosting a Windows Communication Foundation (WCF) service at http://www.contoso.com for a law enforcement agency. The agency adds operations to
support sending biometric fingerprint data via non-buffered streaming. The service data is not routed between intermediaries.
The WCF binding you are using by default does not support encryption.
You need to ensure that fingerprint data is not disclosed when it is passed over the network.
What should you do?

A. Use basicHttpBinding with message security to https://www.contoso.com.
B. Use basicHttpBinding over transport security at https://www.contoso.com.
C. Use wsHttpBinding over message security at https://www.contoso.com.
D. Use wsHttpBinding over transport security at http://www.contoso.com.

Correct Answer: B QUESTION 17
You create a service and deploy it on a network in a building named Building1. You will deploy the service to Building2.
The service in Building1 is configured using the following discovery scopes.
<scopes>
<add
scope=”http://contoso.com/Chicago/Building1″/>
<add
scope=”ldap:///ou=Building1,ou=Chicago,o=contoso,c=us”/>
</scopes>
The service in Building2 will be configured using the following discovery scopes.
<scopes>
<add
scope=”http://contoso.com/Chicago/Building2″/>
<add
scope=”ldap:///ou=Building2,ou=Chicago,o=contoso,c=us”/>
</scopes>
You need to ensure that the client application can discover the service in Building1 or the service in Building2.
Which scopes should you add to the client configuration file?

A. <scopes> <add scope=”http://contoso.com/Chicago/*”/> </scopes>
B. <scopes> <add scope=”http://contoso.com/Chicago”/> </scopes>
C. <scopes> <add scope=”ldap:///ou=Building,ou=Chicago,o=contoso,c=us”/> </scopes>
D. <scopes> <add scope=”ldap:///ou=*,o=contoso,c=us”/> </scopes>

Correct Answer: B QUESTION 18
A Windows Communication Foundation (WCF) service only accepts messages that are signed and encrypted a client application is not receiving expected responses from the service.
You need to enable logging to verity that the messages from the client are signed and encrypted.
You also need to see what each message looks like before the message body is deserialized into a
NET object what should you do?
A. Configure the System Service Model trace source in the system diagnostics configuration section. In the system service Model configuration add the following xML segment <diagnostics> <message Logging log Entire Messages” true logMessagesAtServiceLeveIetrue” logMessagesAtTransportLeveletrue” /> </diagnostics>
B. Configure the System. Service Model trace source in the system diagnostics configuration section. In the system.serviceModel configuration, add the following XML segment, <diagnostics> <message Logging log Entire Message=” true log Messages t Service LeveI-true’ Is <diagnostics>
C. Configure the System. Service Model Message Logging trace source in the system diagnostics configuration sectionIn the system. service Model configuration, add the following XML segment. <diagnostics> <message Logging log Entire Message=’ true Iog Messages At Service LeveI true” log Messages At Transport Level=true” I> <Idiagnostics>
D. Configure the System. Service Model Message Logging trace source in the system. diagnostics configuration section. In the system service Model configuration, add the following xML segment <diagnostics> <message Logging Iog Messages At Service Levele true” log Messages At Transport Levele”true” 1> </diagnostics>

Correct Answer: C
QUESTION 19
You are modifying a Windows Communication Foundation (WCF) service that allows customers to update financial data. The service currently requires a transaction from the client application and is working correctly. The service contract is defined as follows. (Line numbers are included for reference only.)

The service must be modified so that client applications do not need to initiate a transaction when calling the operation. The service must use the client application’s transaction if one is available. Otherwise it must use its own transaction.
You need to ensure that the service operation is always executed within a transaction.
What should you do?
A. Replace line 05 with the following code. <TransactionFlow( TransactionFlowOption.NotAliowed)>
B. Replace line 13 with the following code. <OperationBehavior( TransactionScopeRequired:”False, TransactionAutoComplete:-True)>
C. Replace line 05 with the following code. <TransactionFlow( TransactionFlowOption.Allowed) >
D. Replace line 13 with the following code.
<OperatlonBehavior(
TransaetionScopeRequired:”False,
TransactionAutoComplete:”False)>
Correct Answer: B
QUESTION 20
You are developing a Windows Communication Foundation (WCF) service. You enable message logging, trace listeners, activity propagation, and tracing on the trace sources.
You have the following code segment in the client application. (Line numbers are included for reference only.)

You encounter errors when your client application consumes the service. You need to ensure that your client application can correlate tracing information with the service.
Which code segment should you add at line 04?
Correct Answer: C

Get certified Microsoft 70-513 is a guaranteed way to succeed with IT careers.We help you do exactly that with our high quality Microsoft 70-513 Certification Certified Information Systems Security Professional training materials.

Microsoft 70-516 Study Guide Book,First-hand Microsoft 70-516 Practice Test For Sale

Attention Please:Professional new version Microsoft 70-516 PDF and VCE dumps can now free download on Flydumps.com,all are updated timely by our experts covering all Microsoft 70-516 new questions and questions.100 percent pass your exam.

QUESTION: 1
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an
application. The application contains the following code segment. (Line numbers are included
for reference only.)
01 class DataAccessLayer
02 {
03 private static string connString;
04
05 …
06 public static DataTable GetDataTable(string command){
07
08 …
09 }
10 }
You need to define the connection life cycle of the DataAccessLayer class. You also need to
ensure that the application uses the minimum number of connections to the database. What
should you do?

A. Insert the following code segment at line 04.
private static SqlConnection conn = new SqlConnection(connString);
public static void Open(){
conn.Open();
}
public static void Close(){
conn.Close();
}

B. Insert the following code segment at line 04.
private SqlConnection conn = new SqlConnection(connString);
public void Open(){ conn.Open(); } public void Close(){ conn.Close();
}

C. Replace line 01 with the following code segment. class DataAccessLayer :
IDisposable Insert the following code segment to line 04.
private SqlConnection conn = new SqlConnection(connString);
public void Open(){
conn.Open();
}
public void Dispose(){
conn.Close();
}

D. Insert the following code segment at line 07.
using (SqlConnection conn = new SqlConnection(connString)){
conn.Open();
}
Answer: D
QUESTION: 2 You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create a Windows Communication Foundation (WCF) Data Services service. You discover that when an application submits a PUT or DELETE request to the Data Services service, it receives an error. You need to ensure that the application can access the service. Which header and request type should you use in the application?
A. an X-HTTP-Method header as part of a POST request
B. an X-HTTP-Method header as part of a GET request
C. an HTTP ContentType header as part of a POST request
D. an HTTP ContentType header as part of a GET request

Answer: A
QUESTION: 3 You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create a Windows Communication Foundation (WCF) Data Services service. The service connects to a Microsoft SQL Server 2008 database. The service is hosted by an Internet Information Services (IIS) 6.0 Web server. The application works correctly in the development environment. However, when you connect to the service on the production server, attempting to update or delete an entity results in an error. You need to ensure that you can update and delete entities on the production server. What should you do?
A. Add the following line of code to the
InitializeService method of the service.
config.SetEntitySetAccessRule
(“*”,EntitySetRights.WriteDelete | EntitySetRights.WriteInsert);

B. Add the following line of code to the
InitializeService method of the service.
config.SetEntitySetAccessRule
(“*”,EntitySetRights.WriteDelete | EntitySetRights.WriteMerge);

C. Configure IIS to allow the PUT and DELETE verbs for the .svc Application Extension.

D. Configure IIS to allow the POST and DELETE verbs for the .svc Application Extension.

Answer: C
QUESTION: 4 You use Microsoft .NET Framework 4 to develop an application that connects to a Microsoft SQL Server 2008 database by using SQL Server authentication. The application contains the following connection string. SERVER=DBSERVER-01; DATABASE=pubs; uid=sa; pwd=secret; You need to ensure that the password value in the connection string property of a SqlConnection object does not exist after the Open method is called. What should you add to the connection string?
A. Persist Security Info=True
B. Trusted_Connection=True
C. Persist Security Info=False
D. Trusted_Connection=False

Answer: C
QUESTION: 5 You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The application connects to a Microsoft SQL Server database. The application uses the ADO.NET Entity Framework to manage order data. The application makes a Web service call to obtain orders from an order-tracking system. You need to ensure that the orders are added to the local data store. Which method should you call on the ObjectContext?
A. Attach
B. AttachTo
C. AddObject
D. ApplyCurrentValues

Answer: A
QUESTION: 6 You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The application connects to a Microsoft SQL Server database. The application uses the ADO.NET Entity Framework to model entities. The database includes objects based on the exhibit. (Click the Exhibit button.)
The application includes the following code segment. (Line numbers are included for reference
only.)
01 using (AdventureWorksEntities advWorksContext = new AdventureWorksEntities()){
02
03 }
You need to retrieve a list of all Products from todays sales orders for a specified customer.
You also need to ensure that the application uses the minimum amount of memory when
retrieving the list.
Which code segment should you insert at line 02?

A. Contact customer = context.Contact.Where(“it.ContactID =
@customerId”, new ObjectParameter(“customerId”, customerId)).First();
customer.SalesOrderHeader.Load();
foreach (SalesOrderHeader order in customer.SalesOrderHeader){
order.SalesOrderDetail.Load();
if (order.OrderDate.Date == DateTime.Today.Date){ foreach
(SalesOrderDetail item in
order.SalesOrderDetail){ Console.WriteLine(String.Format(“Product:

{0}
“, item.ProductID));
}
}
}
B.
Contact customer = context.Contact.Where(“it.ContactID =
@customerId”, new ObjectParameter(“customerId”, customerId)).First();
customer.SalesOrderHeader.Load();
foreach (SalesOrderHeader order in customer.SalesOrderHeader){ if (order.OrderDate.Date ==
DateTime.Today.Date){ order.SalesOrderDetail.Load();
foreach (SalesOrderDetail item in
order.SalesOrderDetail){ Console.WriteLine(String.Format(“Product:
{0}
“, item.ProductID));
}
}
}

C. Contact customer = (from contact in context.Contact.Include(“SalesOrderHeader”)
select contact).FirstOrDefault();
foreach (SalesOrderHeader order in customer.SalesOrderHeader){
order.SalesOrderDetail.Load();
if (order.OrderDate.Date == DateTime.Today.Date){
foreach (SalesOrderDetail item in
order.SalesOrderDetail){ Console.WriteLine(String.Format(“Product: {0} “,
item.ProductID));
}
}
}

D. Contact customer = (from contact in
context.Contact.Include(“SalesOrderHeader.SalesOrderDetail”) select
contact).FirstOrDefault();
foreach (SalesOrderHeader order in customer.SalesOrderHeader){if (order.OrderDate.Date
== DateTime.Today.Date){ foreach (SalesOrderDetail item in
order.SalesOrderDetail){ Console.WriteLine(String.Format(“Product:{0} “, item.ProductID));
}
}
}
Answer: B
QUESTION: 7 You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create a Microsoft ASP.NET application. You want to connect the application to a Microsoft SQL Server Express 2008 database named MyDatabase. The primary database file is named MyDatabase.mdf and it is stored in the App_Data folder. You need to define the connection string. Which connection string should you add to the Web.config file?
A. Data Source=localhost; Initial Catalog=MyDataBase; Integrated Security=SSPI; User Instance=True
B. Data Source=.\SQLEXPRESS; Initial Catalog=MyDataBase; Integrated Security=True; User Instance=True
C. Data Source=.\SQLEXPRESS; AttachDbFilename=|DataDirectory|\MyDatabase.mdf; Integrated Security=True; User Instance=True
D. Data Source =SQLEXPRESS; AttachDbFilename=|DataDirectory|\App_Data\MyDatabase.mdf; Integrated Security=SSPI; User Instance=True
Answer: C
QUESTION: 8
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an
application. You use the ADO.NET Entity Framework to model entities. You write the
following code segment. (Line numbers are included for reference only.)
01 AdventureWorks Entities context = n ew AdventureWorksEntities (
02 ” http://localhost:1234/AdventureWorks.svc ”
03 );
04
05 var q = from c in context.Customers
06 where c.City == “London”
07 orderby c.CompanyName
08 select c;
You need to ensure that the application meets the following requirements:

-Compares the current values of unmodified properties with values returned from the data source

Marks the property as modified when the properties are not the same Which code segment should you insert at line 04?

A.
context.MergeOption = MergeOption.AppendOnly;

B.
context.MergeOption = MergeOption.PreserveChanges;

C.
context.MergeOption = MergeOption.OverwriteChanges;

D.
context.MergeOption = MergeOption.NoTracking;

Answer: B
QUESTION: 9
You use Microsoft .NET Framework 4 to develop an application. The configuration file
contains the following code segment.
<configuration>

<connectionStrings>
<add name=”AdventureWorksLT”
connectionString=”Data Source=SQL01;
Initial Catalog=AdventureWorksLT;
Integrated Security=True;”
providerName=”System.Data.SqlClient”/>
</connectionStrings>
</configuration>
You need to retrieve the connection string named AdventureWorksLT from the configuration
file. Which line of code should you use?
A. var connectionString = ConfigurationManager .ConnectionStrings[“AdventureWorksLT”].ConnectionString;
B. var connectionString = ConfigurationManager .ConnectionStrings[“AdventureWorksLT”].Name;
C. var connectionString = ConfigurationManager .AppSettings[“AdventureWorksLT”];
D. var connectionString = ConfigurationSettings .AppSettings[“AdventureWorksLT”];

Answer: A
QUESTION: 10 You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to develop an application that connects to a Microsoft SQL Server 2008 database. The application includes a SqlConnection named conn and a SqlCommand named cmd. You need to create a transaction so that database changes will be reverted in the event that an exception is thrown. Which code segment should you use?
A. var transaction = conn.BeginTransaction(); cmd.Transaction = transaction; try { … transaction.Commit(); }
catch { transaction.Rollback(); }
B. var transaction = conn.BeginTransaction(); cmd.Transaction = transaction; try { … transaction.Commit(); } catch { transaction.Dispose(); }

C. var transaction = conn.BeginTransaction(); cmd.Transaction = transaction; try { … } catch { transaction.Commit(); }
D. var transaction = conn.BeginTransaction(); cmd.Transaction = transaction; try { … transaction.Rollback(); } catch { transaction.Dispose (); }

Answer: A
QUESTION: 11 You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The application connects to a Microsoft SQL Server database and contains a LINQ to SQL data model. The data model contains a function named createCustomer that calls a stored procedure. The stored procedure is also named createCustomer. The createCustomer function has the following signature. createCustomer (Guid customerID, String customerName, String address1) The application contains the following code segment. (Line numbers are included for reference only.) 01 CustomDataContext context = new CustomDataContext(); 02 Guid userID = Guid.NewGuid(); 03 String address1 = “1 Main Steet”; 04 String name = “Marc”;
You need to use the createCustomer stored procedure to add a customer to the database. Which code segment should you insert at line 05?

A. context.createCustomer(userID, name , address1)
B. context.ExecuteCommand(“createCustomer”, userID, name , address1);
C. Customer customer = new Customer() { ID = userID,
Address1 = address1, Name = name ,
};
context.ExecuteCommand(“createCustomer”, customer);

D. Customer customer = new Customer() { ID = userID,
Address1 = address1, Name = name ,
};
context.ExecuteQuery(typeof(Customer), “createCustomer”, customer);
Answer: A
QUESTION: 12 You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. You use a TableAdapter object to load a DataTable object. The DataTable object is used as the data source for a GridView control to display a table of customer information on a Web page. You need to ensure that the application meets the following requirements:

Load only new customer records each time the page refreshes.


Preserve existing customer records. What should you do?

A.
Set the ClearBeforeFill property of the TableAdapter to false. Use the Fill method of the TableAdapter to load additional customers.

B.
Set the ClearBeforeFill property of the TableAdapter to false. Use the GetData method of the TableAdapter to create a new DataTable.

C.
Set the ClearBeforeFill property of the TableAdapter to true. Use the Fill method of the TableAdapter to load additional customers.

D.
Set the ClearBeforeFill property of the TableAdapter to true. Use the GetData method of the TableAdapter to create a new DataTable.

Answer: A
QUESTION: 13 You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to develop an application that connects to a Microsoft SQL Server 2008 database. The application performs a database query within a transaction. You need to ensure that the application can read data that has not yet been committed by other transactions. Which IsolationLevel should you use?

A. ReadUncommitted
B. ReadCommitted
C. RepeatableRead
D. Unspecified
Answer: A

QUESTION: 14
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an
application. You create a stored procedure to insert a new record in the Categories table
according to following code segment.
CREATE PROCEDURE dbo.InsertCategory @CategoryName nvarchar(15), @Identity int OUT AS INSERT INTO Categories (CategoryName) VALUES(@CategoryName) SET @Identity = SCOPE_IDENTITY() RETURN @@ROWCOUNT
You write the following code segment. (Line numbers are included for reference only).
01 private static void ReturnIdentity(string connectionString)
02 {
03 using (SqlConnection connection = new SqlConnection(connectionString))
04 {
05 SqlDataAdapter adapter = new SqlDataAdapter(
06 “SELECT CategoryID, CategoryName FROM dbo.Categories”,connection);
07 adapter.InsertCommand = new SqlCommand(“InsertCategory”, connection);
08 adapter.InsertCommand.CommandType = CommandType.StoredProcedure;
09 SqlParameter rowcountParameter = adapter.InsertCommand.Parameters.Add(
10 “@RowCount”, SqlDbType.Int);
11
12 adapter.InsertCommand.Parameters.Add(
13 “@CategoryName”, SqlDbType.NChar, 15, “CategoryName”);
14 SqlParameter identityParameter = adapter.InsertCommand.Parameters.Add(
15 “@Identity”, SqlDbType.Int, 0, “CategoryID”);
16
17 DataTable categories = new DataTable();
18 adapter.Fill(categories);
19 DataRow categoryRow = categories.NewRow();
20 categoryRow[“CategoryName”] = “New Beverages”;
21 categories.Rows.Add(categoryRow);
22 adapter.Update(categories);
23 Int32 rowCount = (Int32)adapter.InsertCommand.Parameters[“@RowCount”].Value;
24 }

25 }
You need to retrieve the identity of the new record. You also need to retrieve the row count.
What should you do?

A. Insert the following code segment at line 11. rowcountParameter.Direction =
ParameterDirection.ReturnValue; Insert the following c ode segment at line 16.
identityParameter.Direction = ParameterDirection.ReturnValue;

B. Insert the following code segment at line 11. rowcountParameter.Direction =
ParameterDirection.Output;
Insert the following code segment at line 16. identityParameter.Direction =
ParameterDirection.Output;

C. Insert the following code segment at line 11.
rowcountParameter.Direction = ParameterDirection.ReturnValue; Insert the following code
segment at line 16. identityParameter.Direction = ParameterDirection.Output;

D. Insert the following code segment at line 11. rowcountParameter.Direction =
ParameterDirection.Output; Insert the following code segment at line 16.
identityParameter.Direction = ParameterDirection.ReturnValue;
Answer: C
QUESTION: 15 You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to develop an application. You use the ADO.NET Entity Framework Designer to model entities. The

There is a Person entity named person1 that has Track Changes turned on. You need to delete all e-mail addresses that are associated with person1 by using an ObjectContext named context. What are two possible code segments that you can use to achieve this goal? (Each correct answer presents a complete solution. Choose two).

A. foreach(var email in person1.EmailAddresses)
{
email.MarkAsDeleted();
}
context.SaveChanges();

B. while(person1.EmailAddresses.Count() > 0)
{
person1.EmailAddresses.RemoveAt(0);
}
context.SaveChanges();

C. person1.EmailAddresses = null;
context.SaveChanges();

D. person1.EmailAddresses = new TrackableCollection<EmailAddress>();
context.SaveChanges();
Answer: A, B
QUESTION: 16 You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The application uses the ADO.NET Entity Framework to manage customer and related order records. You add a new order for an existing customer. You need to associate the Order entity with the Customer entity. What should you do?
A. Set the Value property of the EntityReference of the Order entity.
B. Call the Add method on the EntityCollection of the Order entity.
C. Use the AddObject method of the ObjectContext to add both Order and Customer entities.
D. Use the Attach method of the ObjectContext to add both Order and Customer entities.

Answer: A
QUESTION: 17 You use Microsoft .NET Framework 4 to develop an application that uses the Entity Framework. The application has an entity model with a Person entity. A Person instance named person1 and an ObjectContext instance named model exist. You need to delete the person1 instance. Which code segment should you use?
A. model.DeleteObject(person1);

model.SaveChanges();
B. model.Detach(person1); model.SaveChanges();
C. model.ExecuteStoreCommand(“Delete”, new [] { new ObjectParameter(“Person”, person1) }); model.SaveChanges();
D. model.ExecuteFunction(“Detach”, new [] { new ObjectParameter(“Person”, person1) }); model.SaveChanges();

Answer: A
QUESTION: 18 You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The application connects to a Microsoft SQL Server database. You use the ADO.NET Entity Framework to manage persistence-ignorant entities. You create an ObjectContext instance named context. Then, you directly modify properties on several entities. You need to save the modified entity values to the database.Which code segment should you use?
A. context.SaveChanges(SaveOptions.AcceptAllChangesAfterSave);
B. context.SaveChanges(SaveOptions.DetectChangesBeforeSave);
C. context.SaveChanges(SaveOptions.None);
D. context.SaveChanges();

Answer: B
QUESTION: 19
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an
application. The application connects to a Microsoft SQL Server database. The application has
two DataTable objects that reference the Customers and Orders tables in the database. The
application contains the following code segment. (Line numbers are included for reference
only.)
01 DataSet customerOrders = new DataSet();
02 customerOrders.EnforceConstraints = true;
03 ForeignKeyConstraint ordersFK = new ForeignKeyConstraint(“ordersFK”,
04 customerOrders.Tables[“Customers”].Columns[“CustomerID”],
05 customerOrders.Tables[“Orders”].Columns[“CustomerID”]);

07 customerOrders.Tables[“Orders”].Constraints.Add(ordersFK);
You need to ensure that an exception is thrown when you attempt to delete Customer records
that have related Order records. Which code segment should you insert at line 06?
A. ordersFK.DeleteRule = Rule.SetDefault;
B. ordersFK.DeleteRule = Rule.None;
C. ordersFK.DeleteRule = Rule.SetNull;
D. ordersFK.DeleteRule = Rule.Cascade;

Answer: B
QUESTION: 20 You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The application connects to a Microsoft SQL Server 2008 database. The application uses DataContexts to query the database. You create a function that meets the following requirements: Updates the Customer table on the database when a customer is marked as deleted. Updates the related entries in other tables (CustomerAddress, CustomerContacts) by marking them as deleted. Prevents consumer code from setting the Deleted columns value directly. You need to ensure that the function verifies that customers have no outstanding orders before they are marked as deleted. You also need to ensure that existing applications can use the updated function without requiring changes in the code. What should you do?
A. Override the Delete operation of the DataContext object.
B. Override the Update operation of the DataContext object.
C. Modify the SELECT SQL statement provided to the DataContext object to use an INNER JOIN between the Customer and Orders tables.
D. Add new entities to the DataContext object for the Customers and Orders tables.

Answer: A

Our material on our site Microsoft 70-516 is exam-oriented, keeping in view the candidates requirements and level of understanding.Microsoft 70-516 materials are in the most popular and easy-to-use PDF version. You can use it on any devices with you anywhere.

Microsoft 70-492 Questions And Answers,Provides Microsoft 70-492 Practice Exam 100% Pass With A High Score

Do not worry about your Microsoft 70-492 exam, Lead2pass now has published the new veriosn Microsoft 70-492 exam dumps with more new added questions and answers, also you can free download Microsoft 70-492 vce test software and pdf dumps on Flydumps.com.

Testlet 1 Scenario video transcoding serviceBackground
You are developing a video transcoding service. This service is used by customers to upload video files, convert video to other formats, and view the converted files. This service is used by customers all over the world.
Business Requirements
The user-facing portion of the application is an ASP.NET MVC application. It provides an interface for administrators to upload video and schedule transcoding. It also enables administrators and users to download the transcoded videos.
When videos are uploaded, they are populated with metadata used to identify the video. The video metadata is gathered by only one system when the video upload is complete. Customers require support for Microsoft Internet Explorer 7 and later. The application contains a header that is visible on every page.
If the logged-on user is an administrator, then the header will contain links to administrative functions. This information is read from a cookie that is set on the server. The administrative links must not be present if an error condition is present.
Technical Requirements
User Experience: Compatibility: Transcoding: Development:
Application Structure
TranscodeWorkerRole.es
QUESTION 1
You need to ensure that developers can connect to a Windows Azure role by using RDP. What should you do?
A. Export a certificate with a private key. Upload the .pfx file to the Management Certificates section on the Azure Management Portal.
B. Export a certificate without a private key. Upload the .cer file to the Management Certificates section on the Azure Management Portal.
C. Export a certificate without a private key. Upload the .cer file to the Certificates section under the TranscodeWorkerRole hosted service on the Azure Management Portal.
D. Export a certificate with a private key. Upload the .pfx file to the Certificates section under the TranscodeWorkerRole hosted service on the Azure Management Portal.
Correct Answer: D Explanation
Explanation/Reference:
Explanation:
QUESTION 2
You need to set the cookie that will be used by the header as defined in the business requirements. Which code segment should you use to replace the existing VideoAdminAttribute class in VideoAdminAttributes.es?

A. Option A
B. Option B
C. Option C
D. Option D
Correct Answer: D Explanation
Explanation/Reference:
Explanation:
QUESTION 3
You are creating a new authentication system that uses an HTTP header value. The existing authentication system must continue to operate normally.
You need to implement the custom authentication.
What should you do? (Each correct answer presents a complete solution. Choose all that apply.)

A. Create a class derived from ActionResult and check for a valid HTTP header value in the ExecuteResult method. Change all actions to return this new class.
B. Create an HttpHandler to check for a valid HTTP header value in the ProcessRequest method.
C. Create an HttpModule and check for a valid HTTP header value in the AuthenticateRequest event.
D. Create a class derived from AuthorizeAttribute and check for a valid HTTP header value in the AuthorizeCore method. Change usages of the existing AuthorizeAttribute to use the new class.
Correct Answer: CD Explanation
Explanation/Reference:
Explanation:
QUESTION 4
You need to maximize performance of video delivery.
Which code segment should you use as the body of the GetVideoStream function in the videoController class?
A. Option A
B. Option B
C. Option C
D. Option D
Correct Answer: A Explanation
Explanation/Reference:
Explanation:
QUESTION 5
The transcode.exe utility activates its license online when it is installed. You need to ensure that the registration of the transcode utility is handled as specified in its license. Which method should you add to the TranscodeWorkerRole class?

A. Option A
B. Option B
C. Option C
D. Option D
Correct Answer: A Explanation
Explanation/Reference:
Explanation:
QUESTION 6
You need to ensure that all the MVC controllers are secure. Which code segment should you use as the body for the CreateController method in AdminVerifierFactory.es?

A. Option A
B. Option B
C. Option C
D. Option D
Correct Answer: A Explanation
Explanation/Reference:
Explanation:
QUESTION 7
Customers download videos by using HTTP clients that support various content encodings. You need to configure caching on the DownloadVideo action to
maximize performance.
Which attribute should you add?
A. Option A
B. Option B
C. Option C
D. Option D
E. Option E
Correct Answer: E Explanation
Explanation/Reference:
Explanation:
QUESTION 8
You need to ensure that all the MVC controllers are secure. Which code segment should you use as the body for the CreateController method in AdminVerifierFactory.es?

A. Option A
B. Option B
C. Option C
D. Option D
Correct Answer: C Explanation
Explanation/Reference:
Explanation:
QUESTION 9
You need to ensure that all customers can delete videos regardless of their browser capability. Which code segment should you use as the body of the SendAsync method in the DeleteHandler class?

A. Option A
B. Option B
C. Option C
D. Option D
Correct Answer: B Explanation
Explanation/Reference:
Explanation:
QUESTION 10
You need to ensure that the transcode.exe utility is installed before the worker role starts. How should you implement the startup task?
(To answer, drag the appropriate values to the correct element or attribute. Each value may be used once, more than once, or not at all. You may need to drag the
split bar between panes or scroll to view content.)

Select and Place: Correct Answer:
Explanation Explanation/Reference:
QUESTION 11
The designer for the website gave you the following image as the design for the page.

The normal color for the tab is *2da4c2, and the color when the mouse is over the tab is #ffd800. The HTML that implements the navigation tab is as follows.

You need to implement the design.
What should you do? (To answer, select the appropriate options in the answer area.)

Hot Area:
Correct Answer:

Explanation Explanation/Reference:
Explanation:
Testlet 2
Scenario ASP.NET MVC application
Background
You are developing an ASP.NET MVC application in Visual Studio 2012 that will be used by Olympic marathon runners to log data about training runs.
Business Requirements
The application stores date, distance, and duration information about a user’s training runs. The user can view, insert, edit, and delete records.
The application must be optimized for accessibility.
All times must be displayed in the user’s local time.

Technical Requirements
Data Access:
Database access is handled by a public class named RunnerLog.DataAccess.RunnerLogDb. All data retrieval must be done by HTTP GET and all data updates
must be done by HTTP POST.

Layout:
All pages in the application use a master layout file named \Views\Shared\_Layout.cshtml.

Models:
The application uses the \Models\LogModel.cs model.
Views:
All views in the application use the Razor view engine. Four views located in \Vtews\RunLog are named:
The application also contains a \Views\Home\Index.cshtml view.
Controllers:
The application contains a \Controllers\Runl_ogController.cs controller.
Images:
A stopwatch.png image is located in the \Images folder.
Videos:
A map of a runner’s path is available when a user views a run log. The map is implemented as an Adobe Flash application and video. The browser should display the video natively if possible, using H264, Ogg, or WebM formats, in that order. If the video cannot be displayed, then the Flash application should be used.
Security:
You have the following security requirements
RunnerLog.Providers.RunLogRoleProvider.es contains a custom role provider. Relevant portions of the application files follow. (Line numbers are included for reference only.)
Application Structure
QUESTION 1
You need to make all of the rows in the table bold in the Views/RunLog/GetLog.cshtml view. Which code segment should you use?
A. table>tr{ font-weight: bold; }
B. table>th:last-child{ font-weight: bold; }
C. table+first-child{ font-weight: bold; }
D. table>tr>th:nth-child(2){ font-weight: bold; }
Correct Answer: A Explanation
Explanation/Reference:
Explanation:
QUESTION 2
If the canvas element is supported by the client browser, the application must display “London 2012” in the footer as text formatted by JavaScript at the end of the
_Layout.cshtml file. You need to modify the layout to ensure that “London 2012” is displayed as either formatted text or as plain text, depending on what the client
browser supports.
Which code segment should you add?
A. Option A
B. Option B
C. Option C
D. Option D
Correct Answer: D Explanation
Explanation/Reference:
Explanation:
QUESTION 3
The date of the run must be displayed in Views\Runlog\GetLog.cshtml. The timestamp must not be displayed. You need to display the date of the run according to
the business requirements.
Which code segment should you use?

A. @Html.DisplayFor(model => log.RunDate)
B. @log.RunDate.ToShortDateString()
C. @log.RunDate.ToString()
D. @Html.DisplayFor(model => log.ShortDate)
Correct Answer: D Explanation
Explanation/Reference:
Explanation:
QUESTION 4
You need to add an action to RunLogController to validate the users’ passwords. Which code segment should you use?

A. Option A
B. Option B
C. Option C
D. Option D
Correct Answer: C Explanation
Explanation/Reference:
Explanation:
QUESTION 5
You need to make the “Distance” header of the table bold in the Views/RunLog/GetLog.cshtml view. Which code segment should you use?
A. table>tr{ font-weight: bold; }
B. table>th:last-child{ font-weight: bold; }
C. table+first-child{ font-weight: bold; }
D. table>tr>th:nth-child (2) { font-weight: bold; }
Correct Answer: D Explanation
Explanation/Reference:
Explanation:
QUESTION 6
You need to extend the edit functionality of RunLogController. Which code segment should you use?

A. Option A
B. Option B
C. Option C
D. Option D
Correct Answer: C Explanation Explanation/Reference:
Explanation:
QUESTION 7
You need to display the “miles” unit description after the distance in the GetLog view. Which line of code should you use to replace line GL21? (Each correct answer presents a complete solution. Choose all that apply.)
A. @log.Distance miles
B. @Htrml.DisplayFor(model => log.Distance) miles
C. @log.Distance.ToString() @Html.TextArea (“miles”)
D. @Htmi.DisplayFor(model => log.Distance.ToString() + ” miles”) Correct Answer: AB
Explanation Explanation/Reference:
Explanation:
QUESTION 8
You need to implement security according to the requirements.
How should you modify RunLogController? (To answer, drag the appropriate code segment to the correct location or locations. Each code segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.)
Select and Place: Correct Answer:
Explanation Explanation/Reference:
QUESTION 9
You need to implement the Views\RunLog\_CalculatePace.cshtml partial view from Views\Runlog \GetLog.cshtml to display the runner’s average mile pace.
How should you implement the view? (To answer, drag the appropriate code segments to the correct location or locations. Each code segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.)
Select and Place:

Correct Answer:

Explanation
Explanation/Reference:
QUESTION 10
You need to ensure that only valid parameters are passed to the EditLog action. How should you build the route? (To answer, select the appropriate options in the answer area.)

Hot Area: Correct Answer:

Explanation Explanation/Reference:
Explanation:
QUESTION 11
You need to implement the map of the runners’ paths.
How should you build the video viewer? (To answer, select the appropriate options in the answer area.)
Hot Area: Correct Answer:

Explanation Explanation/Reference:
Explanation:
QUESTION 12
You need to ensure that the application uses RunLogRoleProvider custom role provider.
How should you modify the web.config file? (To answer, drag the appropriate line of code to the correct location or locations. Each line of code may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.)
Select and Place:

Correct Answer:

Explanation
Explanation/Reference:
QUESTION 13
You need to ensure that only valid parameters are passed to the EditLog action. How should you build the route? (To answer, drag the appropriate code segments to the correct location or locations. Each code segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.)
Select and Place:

Correct Answer: Explanation Explanation/Reference: Testlet 3 Online Shopping Background

You are developing an online shopping web application.
Business Requirements Technical Requirements
General:
Products:
Storage:
Exception handling:
Browser and device support:

Application Structure QUESTION 1
You need to implement client-side animations according to the business requirements. Which line of code should you use? (Each correct answer presents a complete solution. Choose all that apply.)
A. $(“body h1:nth-child(1)”).fadeIn(1000);
B. $(“body h1:nth-child(1)”)-fadeOut(1000);
C. $(“body h2:nth-child(1)”).animate({ opacity: 0 });
D. $(“body h1:nth-child(1)”).animate({ opacity: 1 });
Correct Answer: BC Explanation
Explanation/Reference:
Explanation:
QUESTION 2
You are designing a Windows Communication Foundation (WCF) service that uses the Product class. You need to update the class to meet the storage requirement. What should you do? (Each correct answer presents part of the solution. Choose all that apply.)
A. Mark the Product class with the DataContract attribute.
B. Mark the public members of the Product class with the DataContractFormat attribute.
C. Mark the Product class with the CollectionDataContract attribute.
D. Mark the public members of the Product class with the DataMember attribute.
Correct Answer: AD Explanation
Explanation/Reference:
Explanation:
QUESTION 3
You need to add a method to the ProductController class to meet the exception handling requirements for logging. Which code segment should you use?

A. Option A
B. Option B
C. Option C
D. Option D
Correct Answer: C Explanation
Explanation/Reference:
Explanation:
QUESTION 4
You need to modify the application to meet the productId requirement. What should you do?

A. Option A
B. Option B
C. Option C
D. Option D
Correct Answer: B Explanation
Explanation/Reference:
Explanation: The Contract.Requires(Of TException) method specifies a precondition contract for the enclosing method or property, and throws an exception if the condition for the contract fails. Syntax: ‘Declaration Public Shared Sub Requires(Of TException As Exception) ( _ condition As Boolean _ ) Type Parameters TException The exception to throw if the condition is false. Parameters condition Type: System.Boolean The conditional expression to test.
References:
QUESTION 5
The GetDealPrice method must be called by using Ajax.
You need to get the price of a product by using the GetDealPrice method of the ProductController.

Which code segment should you use? (Each correct answer presents a complete solution. Choose all that apply.)
A. Option A
B. Option B
C. Option C
D. Option D Correct Answer: CD
Explanation Explanation/Reference:
Explanation:
QUESTION 6
You need to implement the requirements for handling IIS errors. What should you do?

A. Option A
B. Option B
C. Option C
D. Option D
Correct Answer: B Explanation
Explanation/Reference:
Explanation:
QUESTION 7
When users attempt to retrieve a product from the product page, a run-time exception occurs if the product does not exist.
You need to route the exception to the CustomException.aspx page.
Which method should you add to MvcApplication?
A. Option A
B. Option B
C. Option C
D. Option D Correct Answer: C
Explanation Explanation/Reference:
Explanation:
QUESTION 8
You need to implement the business requirements for managing customer data.
What should you do? (Each correct answer presents part of the solution. Choose all that apply.)

A. Add a class named Customer-Controller to the Controllers folder. Then add a method named Edit to the class.
B. Create a new controller named Administration in the Controllers folder. Add an action named EditCustomer to the controller.
C. Add a folder named Customer to the Views folder. Then create a view inside this folder named Edit.aspx.
D. Create a new folder named EditCustomer to the Views folder. In the new folder, create a new file named Administration.aspx. Correct Answer: AC
Explanation Explanation/Reference:
Explanation:
QUESTION 9
You need to ensure that new customers enter a valid email address.
Which code should you use? (Each correct answer presents part of the solution. Choose all that apply.)
A. Option A
B. Option B
C. Option C
D. Option D
Correct Answer: AD Explanation Explanation/Reference:
Explanation:
QUESTION 10
An advertising campaign was recently launched. Some of the ads contain a link to products that no longer exist or have IDs that have changed. You need to ensure that all product links display a product. Which code segment should you use to configure the route?

A. Option A
B. Option B
C. Option C
D. Option D Correct Answer: A
Explanation Explanation/Reference:
Explanation:
QUESTION 11
You updated the web.config file with the HTTP run-time value required to display an alternative version of the site. You need to ensure that the correct page displays to the users. Which code segment should you use to update the controller?
A. If (Request.IsTabletDevice)
B. If (Request.Browser.IsBrowser(“Mobile”))
C. If (Request.UserAgent[“Tablet”])
D. If (Request.Browser.IsMobileDevice)
Correct Answer: D Explanation Explanation/Reference:
Explanation:
QUESTION 12
You need to configure session storage in the web.config file to meet the technical requirements for scalability.
Which SessionState mode should you use? (Each correct answer presents a complete solution. Choose all that apply.)

A. StateServer
B. InProc
C. AutoDetect
D. SqlServer
Correct Answer: AD Explanation
Explanation/Reference:
Explanation:
QUESTION 13
You need to update the routes to ensure that a product is always displayed on the product page. Which code segment should you use?

A. Option A
B. Option B
C. Option C
D. Option D
Correct Answer: B Explanation Explanation/Reference:
Explanation:
QUESTION 14
You need to implement the mobile device support requirements.
How should you build the ProcessRequest method? (To answer, select the appropriate options in the answer area.)
y
Hot Area:
Correct Answer:
Explanation Explanation/Reference:
Explanation:

Testlet 4 ASP.NET MVC application in Visual Studio 2012 Background
You are developing an ASP.NET MVC application in Visual Studio 2012 that will be used to process orders.
Business Requirements
The application contains the following three pages.
The application consumes three WCF services to retrieve external data.

Technical Requirements Visual Studio Solution:
The solution contains the following four projects.
ExternalQueue Project:
Entity Framework is used for data access. The entities are defined in the ExternalOrders.edmx file as shown in the following diagram.

The project contains two services defined in the following files.
The ExternalQueue.Helpers namespace contains a definition for a class named OrderNotFoundException.
OrderProcessor Project:
Entity Framework is used for data access. The entities are defined in the ProcessedOrders.edmx file as shown in the following diagram.

The classes are contained in the OrderProcessor.Entities namespace. The project contains the following two controllers.
WCF service proxies to the ExternalQueue, Shipping and OrderUpload services have been generated by using the command prompt. The ExecuteCommandProcedure() method in the ExternalQueueService.svc file must run asynchronously.
The ProcessedOrderController controller has the following requirements.
OrderUpload Project:
The project contains two services defined in the following files. Data Access is maintained in a file named UploadOrder.es.
Shipping Project:
Entity Framework is used for data access. The entities are defined in the ExternalOrders.edmx file as shown in the following diagram.

The Custom Tool property for ExternalOrders.edmx has been removed. POCO classes for the Entity Model are located in the ShippingAddress.es file. The POCO
entity must be loaded by using lazy loading.
The project contains two services defined in the following files.

The IShippingService contract must contain an operation that receives an order number as a parameter. The operation must return a class named ShippingInfo
that inherits from a class named State.

Application Structure
QUESTION 1
The DeleteExternalOrder() method in the ExternalQueueService service is not throwing a FaultException exception as defined by the FaultContractAttribute
attribute in the IExternalQueueService.cs file.
You need to throw the FaultException exception.

Which code segments can you insert at line EQ45 to achieve this goal? (Each correct answer presents a complete solution. Chose all that apply.)
A. Option A
B. Option B
C. Option C
D. Option D
Correct Answer: CD Explanation
Explanation/Reference:
Explanation:
QUESTION 2
The GetVendors() action in the ProcessedOrderController controller is querying the database each time it is run. The GetVendors() action must query the database only if the cache is null. You need to add code to the action at line PC33 to cache the data. Which code segment can you use? (Each correct answer presents a complete solution. Choose all that apply.)

A. Option A
B. Option B
C. Option C
D. Option D
Correct Answer: CD Explanation
Explanation/Reference:
Explanation:
QUESTION 3
The GetExternalOrder() method in the ExternalQueueService service is throwing a runtime error. The method must query the database for a record that matches the orderNum parameter passed to the method.
You need to modify the queryString string to retrieve the record. With which code segment should you replace line EQ64?

A. Option A
B. Option B
C. Option C
D. Option D
Correct Answer: A Explanation
Explanation/Reference:
Explanation:
QUESTION 4
You need to modify the ExecuteCommandProcedure() method to meet the technical requirements. Which code segment should you use?

A. Option A
B. Option B
C. Option C
D. Option D
Correct Answer: A Explanation
Explanation/Reference:
Explanation:
QUESTION 5
You need to regenerate the service proxies to include task-based asynchronous method signatures. Which command should you use?
A. aspnet_regiis.exe /t:code http://localhost:62965/UploadCallbackService.svc
B. svcutil.exe /t:code http://localhost:62965/UploadCallbackService.svc
C. aspnet_compiler.exe /t:code http://localhost:62965/UploadCallbackService.svc
D. aspnet_regiis.exe /t:code http://localhost:62965/UploadService.svc
E. svcutil.exe /t:code http://localhost:62965/UploadService.svc
Correct Answer: B Explanation
Explanation/Reference:
Explanation: http://msdn.microsoft.com/en-us/library/aa347733.aspx
QUESTION 6
The DeleteExternalOrder() method in the ExternalQueueService service is not throwing a FaultException exception as defined by the FaultContractAttribute
attribute in the IExternatQueueService.cs file.

You need to throw the FaultException exception.
Which code segment can you insert at line EQ45 to achieve this goal? (Each correct answer presents a complete solution. Chose all that apply.)

We provide thoroughly reviewed Microsoft 70-492 using the training resources which are the best for Microsoft 70-492 test, and to get certified by Microsoft Windows Store apps.It is a best choice to accelerate your career as a professional in the Information Technology industry. Now we add the latest Microsoft 70-492 content and to print and share content.