Latest Microsoft 70-516 Real Exam Download 21-30

Ensurepass

QUESTION 21

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create an application. The application connects to a Microsoft SQL Server database. The application stores user names and passwords in the database. You need to ensure that users cannot read passwords extracted from the database. What should you do?

 

A.       Encrypt stored passwords by using the RC2CryptoServiceProvider class.

B.       Encrypt stored passwords by using the TripleDESCryptoServiceProvider class.

C.        Append a random salt to the password by using the RNGCryptoServiceProvider class.

Encrypt stored passwords by using the RijndaelManaged class.

D.       Append a random salt to the password by using the RNGCryptoServiceProvider class.

Hash stored passwords by using the SHA1CryptoServiceProvider class.

 

Correct Answer: D

 

 

QUESTION 22

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create an application. The application connects to a Microsoft SQL Server database. The application stores encrypted credit card numbers in the database. You need to ensure that credit card numbers can be extracted from the database. Which cryptography provider should you use?

 

A.         DSACryptoServiceProvider

B.         AESCryptoServiceProvider

C.          MD5CryptoServiceProvider

D.         SHA1CryptoServiceProvider

 

Correct Answer: B

 

 

QUESTION 23

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create a Microsoft ASP.NET application. The application connects to a Microsoft SQL Server database. The application is hosted on a Web server along with other applications. You need to secure the transmission of data between the application and the database. You need to achieve this goal without affecting other applications. What should you do?

A.       Encrypt the connection string.

B.       Use encryption to store sensitive data in the database.

C.        Use Secure Sockets Layer (SSL) to establish connections to the database.

D.       Use Internet Protocol Security (IPSec) to secure the communication channel.

 

Correct Answer: C

 

 

QUESTION 24

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create an application. The application uses the ADO.NET Entity Framework to model entities. The application allows users to make changes to entities while disconnected from the central data store.

 

You need to ensure that when the user connects to the central data store and retrieves new data, the application meets the following requirements:

 

Ÿ   Changes made to the local data store in disconnected mode are preserved.

Ÿ   Entities that have already been loaded into the local data store, but have not been modified by the user, are updated with the latest data.

 

What should you do?

 

A.       Call the query’s Execute method by using the MergeOptions.AppendOnly option.

B.       Call the query’s Execute method by using the MergeOptions.OverwriteChanges option.

C.        Call the Refresh method of ObjectContext by using the RefreshMode.StoreWins option.

D.       Call the Refresh method of ObjectContext by using the RefreshMode.ClientWins option.

 

Correct Answer: D

 

 

QUESTION 25

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create an application. The application uses the ADO.NET Entity Framework to model persistence-ignorant entities. The application operates in a disconnected mode. You need to ensure that changes made to local entities while the application is in the disconnected mode are correctly persisted. Which method should you call before persisting changes?

 

A.       ObjectContext.Refresh

B.       DataContext.AcceptAllChanges

C.        ObjectStateEntry.AcceptChanges

D.       ObjectStateEntry.SetModifiedProperty

 

Correct Answer: D

 

QUESTION 26

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create an application. The application uses the ADO.NET Entity Framework to model entities. You deploy an application to a production server. The application uses the model and mapping files that are deployed as application resources. You need to update the conceptual model for the application on the production server. What should you do?

 

A.       Copy the updated .edmx file to the production server.

B.       Copy the updated .csdl file to the production server.

C.        Copy the updated .ssdl file to the production server.

D.       Recompile the application and redeploy the modified assembly file.

 

Correct Answer: D

 

 

QUESTION 27

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create an application. The application uses the ADO.NET Entity Framework to model entities. You need to ensure that the model and mapping files are not deployed as application resources.

What should you do?

 

A.       Modify the connection string in the application’s .config file to refer to the absolute physical path to the .edmx file.

B.       Modify the connection string in the application’s .config file to refer to the relative path to the .edmx file.

C.        Set the value of the .edmx file’s Metadata Artifact Processing property to Copy to Output Directory.

D.       Set the value of the .edmx file’s Build Action property to Copy to Output.

 

Correct Answer: C

 

 

QUESTION 28

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create an application. The application updates several Microsoft SQL Server databases within a single transaction. You need to ensure that after a resource failure, you can manage unresolved transactions. What should you do?

 

A.       Call the EnlistVolatile method of the Transaction class.

B.       Call the EnlistDurable method of the Transaction class.

C.        Call the Reenlist method of the TransactionManager class.

D.       Call the RecoveryComplete method of the TransactionManager class.

 

Correct Answer: C

 

 

 

QUESTION 29

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create an application. The application connects to several SQL Server databases. You create a function that modifies customer records that are stored in multiple databases. All updates for a given record are performed in a single transaction. You need to ensure that all transactions can be recovered. What should you do?

 

A.       Call the EnlistVolatile method of the Transaction class.

B.       Call the EnlistDurable method of the Transaction class.

C.        Call the Reenlist method of the TransactionManager class.

D.       Call the RecoveryComplete method of the TransactionManager class.

 

Correct Answer: B

 

 

QUESTION 30

You use Microsoft Visual studio 2010 and Microsoft NET Framework 4.0 to create an application. The application uses the ADO.NET Entity Framework to model entities. The model includes the entity shown in the following exhibit:

 

clip_image001

 

You need to add a function that returns the number of years since a person was hired. You also need to ensure that the function can be used within LINQ to Entities queries. What should you do?

 

A.       //Add the following conceptual model function returns the number of years since an instructor was hired

 

<Function Name="YearsSince" ReturnType="Edm.Int32">

<Parameter Name="date" Type="Edm.DateTime" />

<DefiningExpression>

Year(CurrentDateTime()) – Year(date)

</DefiningExpression>

</Function>

// add the following method to your application and use an EdmFunctionAttribute to map it to the conceptual model function:

 

[EdmFunction("SchoolModel", "YearsSince")]

public static int YearsSince(DateTime date){

throw new NotSupportedException("Direct calls are not supported."); }

 

B.       //Add the following conceptual model function returns the number of years since an instructor was hired

 

<Function Name="YearsSince" ReturnType="Edm.Int32">

<Parameter Name="date" Type="Edm.DateTime" />

<DefiningExpression>

Year(CurrentDateTime()) – Year(date)

</DefiningExpression>

</Function>

 

// add the following method to your application and use an EdmFunctionAttribute to map it to the conceptual model function:

 

[EdmFunction("SchoolModel", "YearsSince")]

public static int YearsSince(DateTime date){

return CurrentDateTime() – Year(date);

}

 

C.        //Add the following conceptual model function returns the number of years since an instructor was hired

 

<Function Name="YearsSince" ReturnType="Edm.Int32">

<Parameter Name="date" Type="Edm.DateTime" />

<DefiningExpression>

YearsSince(DateTime date)

</DefiningExpression>

</Function>

 

// add the following method to your application and use an EdmFunctionAttribute to map it to the conceptual model function:

 

[EdmFunction("SchoolModel", "YearsSince")]

public static int YearsSince(DateTime date){

return CurrentDateTime() – Year(date);

}

 

D.       Use the Entity Data Model Designer to create a complex property named YearsSinceNow that can be accessed throuqh the LINQ to Entites query at a Later time

Correct Answer: A

 

 

Download Latest Microsoft 70-516 Real Free Tests , help you to pass exam 100%.