Killtest問題集は最高の技術価値を持ち、専門家と学者の勉強と研究に力を尽くしています。私達が提供するPDF問題集とソフトウェアバージョンの問題集によって貴方が受験する科目に用意を行い、大量の時間と精力を節約できます。

C# 問題集問題集を使って、一回で試験を合格することを保証いたして、でないと、お客さんが問題集を買うお金を全額返済する上に他の試験科目を無料で贈りします

下記は70-340 の問題集でみんなと分かち合います


5. You are an application developer for your company. You are developing a forms-based application that

reads files that are named by users of the application. The application contains the following method.

bool approveFileName(string fileName) {

string docRoot=@"C:\MyApp\Documents\";

// Your code goes here... Throw an exception if you meet an error.

return true;

}

Users of the application must not be allowed to access files that are stored in any location other than the

C:\MyApp\Documents folder.

You need to add code to the method to achieve this goal.

Which code segment or code segments should you use? (Choose all that apply.)

A. fileName=Path.GetFullPath(fileName);

B. fileName=fileName.ToUpper();

C. fileName=fileName.ToLower();

D. docRoot=docRoot.ToLower();

E. fileName=docRoot+fileName;

F. if (!fileName.StartsWith(docRoot))

throw new ApplicationException (

"User asked for file in wrong directory");

Answer: ACDF

6. You are an application developer for your company. You develop a Windows Forms application that

connects to a local Microsoft SQL Server database by using the Microsoft .NET Framework Data Provider

for SQL Server. The application currently connects to the database by using an account that is a member of

the System Administrator role in SQL Server.

You need to ensure that the application can connect to the database by using the user account of the

interactive user without providing additional permissions.

What should you do?

A. Modify the application to activate a SQL Server application role.

B. Modify the application to use SQL Server integrated security.

C. Modify the application to send a security token that contains the authentication information in a Kerberos

ticket.

D. Modify the application to use COM+ security roles.

Answer: B

7. You are an application developer for your company. Part of an application that you are developing

accepts user input from a TextBox control. The information entered by the user must be alphanumeric only,

and it must contain no symbols or punctuation.

You need to ensure that the user's input contains only the appropriate data before using the input

elsewhere in the application. Your solution must not require users of the application to take additional steps

when entering data.

What should you do?

A. Modify the TextChanged event handler of the TextBox control so that the Text property of the text box is

cleared whenever a non-alphanumeric character is detected.

B. Use the following regular expression to modify the user's input.

[^\w\.@-]

C. Store the user's input in a variable named userinput. Use the following expression to modify the user's

input.

userinput.Replace("@-]","")

D. Convert the user's input to all lowercase characters.

Answer: B

8. You are an application developer for your company. You are developing a Windows-based payroll

application that will be used by all payroll administrators in the company. The application has a single

executable file that uses a separate assembly to modify payroll data.

You need to design security for your application to ensure that the assembly cannot be called by

unauthenticated and unauthorized users.

What should you do?

A. Run the application by using a user account that has access to the application directory.

B. Modify the application to validate all user-entered data.

C. Modify the application to authenticate and authorize user access within each assembly as it is called.

D. Modify the application to authenticate and authorize user access when each user runs the executable

file.

E. Set the folder-level permissions to the executable file by using directory security

Answer: C