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-10-24
  • Testing Engine (SoftWare Version): $ 89.00
  • PDF (Printable Version) Price: $15.00

It can be downloaded after you paying for it without any delay.

Free 70-340 Demo Download

just4study offers free demo for MCSD.NET 70-340 exam (Implementing Security for Applications with Microsoft Visual C# .NET). You can check out the interface, question quality and usability of our practice exams before you decide to buy it. We are the only one site can offer demo for almost all products.

Free 70-340 test engine download

 

Exam Description

It is well known that 70-340 exam test is the hot exam of Microsoft certification. just4study offer you all the Q&A of the 70-340 real test . It is the examination of the perfect combination and it will help you pass 70-340 exam at the first time!

Why choose just4study 70-340 braindumps

Quality and Value for the 70-340 Exam
100% Guarantee to Pass Your 70-340 Exam
Downloadable, Interactive 70-340 Testing engines
Verified Answers Researched by Industry Experts
Drag and Drop questions as experienced in the Actual Exams
Practice Test Questions accompanied by exhibits
Our Practice Test Questions are backed by our 100% MONEY BACK GUARANTEE.

just4study 70-340 Exam Features

Quality and Value for the 70-340 Exam

just4study Practice Exams for Microsoft 70-340 are written to the highest standards of technical accuracy, using only certified subject matter experts and published authors for development.

100% Guarantee to Pass Your 70-340 Exam

If you prepare for the exam using our just4study testing engine, we guarantee your success in the first attempt. If you do not pass the MCSD.NET 70-340 exam (Implementing Security for Applications with Microsoft Visual C# .NET) on your first attempt we will give you a FULL REFUND of your purchasing fee AND send you another same value product for free.

Microsoft 70-340 Exams (in EXE format)

Our Exam 70-340 Preparation Material provides you everything you will need to take your 70-340 Exam. The 70-340 Exam details are researched and produced by Professional Certification Experts who are constantly using industry experience to produce precise, and logical. You may get questions from different web sites or books, but logic is the key. Our Product will help you not only pass in the first try, but also save your valuable time.

70-340 Downloadable, Interactive Testing engines

We are all well aware that a major problem in the IT industry is that there is a lack of quality study materials. Our Exam Preparation Material provides you everything you will need to take a certification examination. Like actual certification exams, our Practice Tests are in multiple-choice (MCQs) Our Microsoft 70-340 Exam will provide you with exam questions with verified answers that reflect the actual exam. These questions and answers provide you with the experience of taking the actual test. High quality and Value for the 70-340 Exam:100% Guarantee to Pass Your MCSD.NET exam and get your 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

http://www.Just4study.com The safer.easier way to get MCSD.NET Certification.