MCSD.NET - 70-340 Exam Question:
Download Questions PDF

How to prevent malicious code from running, a
written company policy does not permit developers to log on by using accounts that have more
permissions than necessary.
Your user account is a member of the Users group and the VS Developers group. You attempt to
run an application that requires Administrator-level permissions. You receive an error message
that states that permission is denied.
You need to be able to run the application.
What should you do?
A. Ask the network administrator to add your user account to the domain Administrators group.
B. Ask the administrator of your client computer to add your user account to the local
Administrators group.
C. Add the administrator of your client computer to add your user account to the Power Users
group.
D. Run the application by using the runas command and specify a user account in the local
Administrators group.

Answer:

D. Run the application by using the runas command and specify a user account in the local
Administrators group.

Download MCSD.NET - 70-340 Exam Interview Questions And Answers PDF

Previous QuestionNext Question
Suppose You are an application developer for your company. You are conducting a code review of a
Windows Forms application that was developed by another developer. The application
includes a function named Logon(), which validates a users logon credentials. The function
displays a dialog box for the user to enter the users credentials, and the function validates those
credentials by using a database.
The function returns a value of 0 if the users password is incorrect, a value of 1 if the users user
ID is incorrect, and a value of 2 if both are correct. Users should receive access to the application
only if the function returns a value of 2. A function named EndApp() is used to exit the application.
The application must display a message to the user, depending on the result of the Logon()
function.
The application contains the following code segment.
int logonresult = Logon();
switch(logonresult) {
case 0:
MessageBox.Show("User name is OK, password incorrect.");
break;
case 1:
MessageBox.Show("User name is incorrect.");
break;
default:
MessageBox.Show("Welcome!");
break;
}
if(logonresult != 2) {
EndApp();
}
You need to improve the security of this code segment while maintaining its funtionality. You
decide to replace the existing code segment.
Which code segment should you use?
A. if(Logon() != 2) {
Console.WriteLine("Logon error.");
EndApp();
}
B. if(Logon() != 2) {
Console.WriteLine("Logon error.");
EndApp();
}
else {
MessageBox.Show("Welcome!");
}
C. int logonresult = Logon();
switch(logonresult) {
case 0:
MessageBox.Show("User name is OK, password incorrect.");
EndApp();
break;
case 1:
MessageBox.Show("User name is incorrect.");
EndApp();
break;
default:
MessageBox.Show("Welcome!");
break;
}
D. int logonresult = Logon();
if(logonresult == 2) {
MessageBox.Show("Welcome!");
}
else {
MessageBox.Show("User name or password was incorrect.");
EndApp();
}
Suppose You develop an application that customers
will be able to automate by using Microsoft Visual Basic for Applications (VBA) scripts. The
application will be accompanied by sample VBA scripts. Customers must be able to review the
sample VBA scripts. You want customers to be able to automate the installed application by using
any of the sample VBA scripts or by creating their own automation scripts. You also want to allow
customers to choose not to apply any automation scripts.
You need to distribute the sample VBA scripts with your application in a manner that minimizes
security risks for the customer.
What should you do?
A. On installation, place all the sample VBA scripts in a subfolder of the application?s installation
folder.
B. On installation, as the user to choose one sample VBA script to install as the application?s
automation script.
C. Do not install the same VBA scripts.
Leave the files in a folder on the installation media.
D. Encrypt same VBA scripts on the installation media and decrypt the files during installation.