Microsoft MCSD.NET 70-340 Exam

Implementing Security for Applications with Microsoft Visual C# .NET

  • Exam Number/Code : 70-340
  • Exam Name : Implementing Security for Applications with Microsoft Visual C# .NET
  • Questions and Answers : 90 Q&As
  • Update Time: 2011-03-30
  • Price: $ 88.00 $ 199.00
  •  
  • Note: After purchase, we will send questions within 24 hours.

This braindumps needs pre order, and we will make this product for you within 2~3 weeks.

Exam 70-340 Preparation from just4exam braindumps include:

After you purchase our product, we will offer free update in time for 90 days.
100% Pass Guaranteed at First Attempt Or Full Refund
Immediate Download After Purchase
Comprehensive questions with complete details
Questions accompanied by exhibits
Verified Answers Researched by Industry Experts
Drag and Drop questions as experienced in the just4exam
Questions updated on regular basis
These questions and answers are backed by our GUARANTEE
Like actual certification exams our product is in multiple-choice questions (MCQs)


Passing the Microsoft 70-340 Exam:Passing the 70-340 exam has never been faster or easier, now with actual questions and answers, without the messy 70-340 braindumps that are frequently incorrect. just4exam Unlimited Access Exams are not only the cheaper way to pass without resorting to 70-340 dumps, but at only $ 199.00 you get access to the exam from every certification vendor.


Our 70-340 practice exams and study questions are composed by current and active Information Technology experts, who use their experience in preparing you for your future in IT.


Microsoft 70-340 Search Help Feel free to use search terms below while searching the Net for 70-340 exam:

70-340 brain dump simulations
70-340 brain dumps question
70-340 braindump work
70-340 master braindumps
70-340 braindump model
70-340 latest braindumps


Commitment to Your Success:

At just4exam we are committed to you ongoing success. Our braindumps are constantly being updated and compared to industry standards.


You are not about to purchase a disposable product. 70-340 braindumps updates are supplied free of charge. Regardless of how soon you decide to take the actual 70-340 examination certification, you will be able to walk into the testing room as confident as the Certification Administrator.


Skip all the worthless 70-340 exam tutorials and download 70-340 exam materials with real questions and answers and a price too unbelievable to pass up. Act now and download your Actual Tests today!

http://www.just4exam.net The safer.easier way to get MCSD.NET Certification.
 
 
Exam : Microsoft 70-340
Title : Implementing Security for Applications with MS Visual C#.NET


1. You are an application developer for your company. You create a serviced component named RecordsAdmin. RecordsAdmin exposes administrative methods for a records management application. The declaration for RecordsAdmin includes the following code segment.
[assembly: ApplicationAccessControl(true)]
[ComponentAccessControl(true),
SecurityRole("Admin")]
public class RecordsAdmin : ServicedComponent {
}
You install RecordsAdmin on a test computer. You use a test application that runs on the test computer under a local computer account named Tester. The Tester account is a member of the Users group and the Debugger Users group. When the test application calls RecordsAdmin, you receive the following error message: "Access is denied."
You want the test application to have access to RecordsAdmin. You want to achieve this goal without granting unnecessary permissions to the Tester account.
What should you do?
A. Add the Tester account to the local Administrators group.
B. Add the Tester account to the Admin role of RecordsAdmin by using the Component Services tool.
C. Add a role named TesterRole to RecordsAdmin. Add the Tester account to the TesterRole role by using the Component Services tool.
D. To the beginning of each method exposed by RecordsAdmin, add the following code segment.
if (ContextUtil.IsCallerInRole("Admin")) {
// Method body here
}
E. To the beginning of each method exposed by RecordsAdmin, add the following code segment.
SecurityCallContext context;
context = SecurityCallContext.CurrentCall;
if (context.IsUserInRole("Admin", "Tester")) {
// Method body here
}
Answer: C

2. 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:MyAppDocuments";
// 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:MyAppDocuments 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

3. You are an application developer for your company. You develop an application that uses an external class library. You run the Permissions View tool on the class library and receive the following outpu
Microsoft (R) .NET Framework Permission Request Viewer. Version 1.1.4322.573
Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.
minimal permission set:
<PermissionSet class="System.Security.PermissionSet" version="1">
<IPermission class="System.Security.Permissions.ReflectionPermission,
mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1" Flags="ReflectionEmit"/>
<IPermission class="System.Security.Permissions.SecurityPermission,
mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1" Flags="SerializationFormatter"/>
</PermissionSet>
optional permission set:
<PermissionSet class="System.Security.PermissionSet"
version="1" Unrestricted="true"/>
refused permission set:
Not specified
You need to add corresponding attributes in your application.
Which code segment should you use?
A. [assembly: ReflectionPermission(SecurityAction.RequestRefuse, ReflectionEmit=false)]
[assembly: SecurityPermission(SecurityAction.RequestRefuse,
SerializationFormatter=false)]
[assembly: PermissionSetAttribute(SecurityAction.RequestOptional, Unrestricted=true)]
B. [assembly: ReflectionPermission(SecurityAction.RequestMinimum, ReflectionEmit=false)]
[assembly: SecurityPermission(SecurityAction.RequestRefuse,
SerializationFormatter=false)]
[assembly: PermissionSetAttribute(SecurityAction.RequestRefuse, Unrestricted=true)]
C. [assembly: ReflectionPermission(SecurityAction.RequestMinimum, ReflectionEmit=false)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum,
SerializationFormatter=false)]
[assembly: PermissionSetAttribute(SecurityAction.RequestOptional, Unrestricted=true)]
D. [assembly: ReflectionPermission(SecurityAction.RequestMinimum, ReflectionEmit=true)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum,
SerializationFormatter=true)]
[assembly: PermissionSetAttribute(SecurityAction.RequestOptional, Unrestricted=true)]
Answer: D

4. You are an application developer for your company. You are developing a Windows Forms application. You deploy a supporting assembly named MyAssembly.dll to the global assembly cache. During testing, you discover that the application is prevented from accessing MyAssembly.dll.
You need to ensure that the application can access MyAssembly.dll.
What should you do?
A. Digitally sign the application by using a digital certificate.
B. Run the caspol.exe -s on command from the command line.
C. Run the Assembly Linker to link MyAssembly.dll to the application.
D. Modify the security policy to grant the application the FullTrust permission.
Answer: D

5. You are an application developer for your company. You create a Web application that is used by all users in the company. The application is hosted on the intranet Web server, which is named WebServer. WebServer has IIS 5.0 installed. The Web application is configured to use Integrated Windows authentication. The Web.config file specifies that the authentication mode is set to Windows.
The application connects to a Microsoft SQL Server database named DataStore. The database is located on WebServer. The SQL Server computer is configured with SQL Server logins disabled. The database connection code is shown in the following code segment.
string myConnStr;
myConnStr = @"Initial Catalog=""DataStore"";";
myConnStr = myConnStr + "Data Source=localhost;Integrated Security=SSPI;";
SqlConnection myConn = new SqlConnection(myConnStr);
string myInsert;
myInsert = "INSERT INTO Customer (CustomerID, Name) Values('123', 'John Doe')";
SqlCommand myCmd = new SqlCommand(myInsert);
myCmd.Connection = myConn;
myConn.Open();
myCmd.ExecuteNonQuery();
myCmd.Connection.Close();
When you run the application by using Microsoft Internet Explorer, you receive an error message that reads in part: "Login failed for user WebServerASPNET."
You need to ensure that the application can run successfully without prompting the user for a user name and password.
What should you do?
A. Change the authentication mode in IIS to basic authentication. Update the connection string.
B. Change the authentication mode in IIS to Anonymous and supply a login ID and password for a SQL Server login account that has access to the database. Update the connection string.
C. Enable Integrated Windows authentication in Internet Explorer.
D. Enable impersonation in the Web.config file.
Answer: D