Ensurepass

QUESTION 81

You create Microsoft Windows-based applications.

You create an application that requires users to be authenticated by a domain controller.

The application contains a series of processor intensive method calls that require different database connections. A bug is reported during testing.

The bug description states that the application hangs during one of the processor-intensive calls more than 50 percent of the times when the method is executed. Your unit test for the same method was successful.

You need to reproduce the bug.

Which two factors should you ascertain from the tester? (Each correct answer presents part of the solution. Choose two.)

A. Security credentials of the logged on user

B. Code access security settings

C. Hardware settings

D. Network settings

E. Database settings

Correct Answer: DE


QUESTION 82

You are a Web developer for Contonso. You are creating an online inventory Web site to be used by employees in Germany and the United States.

When a user selects a specific item from the inventory, the site needs to display the cost of the item in both United States currency and German currency. The cost must be displayed appropriately for each locale.

You want to create a function to perform this task. Which code should you use?

A. private string CKGetDisplayValue(double value,string inputRegion) Exam

{

string display: RegionInfo region;

region = new RegionInfo(inputRegion); display = value.ToString("C");

display += region.CurrencySymbol; return display;

}

B. private string CKGetDisplayValue(double value,string inputCulture) { string display; NumberFormatInfo LocalFormat = (NumberFormatInfo)NumberFormatInfo.CurrentInfo. Clone();

display = value.ToString("C", LocalFormat); return display;

}

C. private string CKGetDisplayValue(double value,string inputRegion) { string display;

RegionInfo region;

region = new RegionInfo(inputRegion); display = value.ToString("C");

display += region.ISOCurrencySymbol; return display;

}

D. private string CKGetDisplayValue(double value, string inputCulture) { string display; CultureInfo culture;

culture = new CultureInfo(inputCulture); display = value.ToString("C", culture); return display;

}

Correct Answer: D


QUESTION 83

You work as an application developer at CER-Tech.com. Cert-Tech.com uses Visual studio.NET 2005 as its Application Development platform.

You are developing a .NET Framework 2.0 application used to store a type-safe list of names and e-mail addresses. The list will be populated all at ones from the sorted data which means you will not always need to perform insertion or deletion operations on the data. You are required to choose a data structure that optimizes memory use and has good performance.

What should you do?

A. The System.Collections.Generic.SortedList class should be used

B. The System.Collections.HashTable class should be used

C. The System.Collections.Generic.SortedDictionary class should be used

D. The System.Collections.SortedList class should be used

Correct Answer: A


QUESTION 84

What kind of object does the generic Dictionary enumerator return?

A. Object

B. Generic KeyValuePairt object

C. Key

D. Value

Correct Answer: B


QUESTION 85

Which event would you use to run a method immediately after serialization occurs?

A. OnSerializing

B. OnDeserializing

C. OnSerialized

D. OnDeserialized

Correct Answer: C


QUESTION 86

You work as an application developer at Cer-Tech.com.You are in the process of creating an application for Cert-Tech.com’s Human Resources department that tracks employee benefits

You have to store current employee data without recompiling the application. You elect to store this employee data as a custom section in the application configuration file. The relevant portion of the application configuration file is shown in the following:

<?xml version="1.0" encoding="utf-8">

<configuration>

</configSections>

<!– Begin Custom Section–>

<EmployeeSection type="fulltime"> What should you do? (Choose two)

A. Create a custom section handler class that inherits the ConfigurationSection interface

B. Add a section element to the EmployeeSection element of the application configuration file

C. Create a custom section handler class that implements the IConfigurationSectionHandler interface.

D. Add an EmployeeSection element to the configSections element of the application confguration file

E. Create a custom section handler class that implements the IApplicationSettingsProvider interface

F. Add a section element to the configSections element of the application configuration file

Correct Answer: AF


QUESTION 87

You are developing an application that uses role-based security. The principal policy of the application domain is configured during startup with the following code:

AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal);

You need to restrict access to one of the methods in your application so that only members of the local Administrators group can call the method. Which attribute should you place on the method?

A. [PrincipalPermission

(SecurityAction.Demand, Name = @"BUILTINAdministrators") ]

B. [PrincipalPermission

(SecurityAction.Demand, Role = @"BUILTINAdministrators") ]

C. [PrincipalPermission

(SecurityAction.Assert, Name = @"BUILTINAdministrators") ]

D. [PrincipalPermission

(SecurityAction.Assert, Role = @"BUILTINAdministrators") ]

Correct Answer: B


QUESTION 88

You deploy several .NET-connected applications to a shared folder on your company network. Your applications require full trust to execute correctly. Users report that they receive security exceptions when they attempt to run the applications on their computers. You need to ensure that the applications on the users computers run with full trust. What should you do?

A. Apply a string name to the applications by using the Strong Name tool (Sn.exe)

B. Use the security settings of internet explorer to add the shared folder to the list of trusted sites

C. Use the Code Access Security Policy tool (Caspol.exe) to add a new code group that has the full trust permission set. The new code group must also contain a URL membership condition that specifies the URL of the shared folder where your application reside

D. Grant the full trust permission set to the Trusted Zone code group by using the Code Access Security Policy Tool (Caspol.exe)

Correct Answer: C


QUESTION 89

You are developing an application that runs by using the credentials of the end user. Only users who are members of the Administrator group get permission to run the application. You write the following security code to protect sensitive data within the application.

bool isAdmin=false;

WindowsBuiltInRole role=WindowsBuiltInRole.Administrator;

……

if(!isAdmin)

throw new Exception("User not permitted");

You need to add a code segment to this security code to ensure that the application throws an exception if a user is not a member of the Administrator group. Which code segment should you use?

A. WindowsPrincipal currentUser = (WindowsPrincipal)Thread.CurrentPrincipal; IsAdmin= currentUser.IsInRole(role);

B. WindowsIdentity currentUser = WindowsIdentity.GetCurrent(); foreach (IdentityReference grp in currentUser.Groups) { NTAccount grpAccount=((NTAccount)grp.Translate(typeof(NTAccount))); isAdmin=grp.Value.Equals(role);

if (isAdmin) break;

}

C. GenericPrincipal currentUser = (GenericPrincipal) Thread.CurrentPrincipal; IsAdmin = currentUser.IsInRole(role.ToString());

D. WindowsIdentity currentUser = (WindowsIdentity)Thread.CurrentPrincipal.Identity; isAdmin=currentUser.Name.EndsWith("Administrator");

Correct Answer: A


QUESTION 90

You work as aplication developer at Cer-Tech.com. You have recently created an aplication that includes the code shown below.

You now need to invoke the GetFileContents method asynchronously.

You have to ensure that the code you use to invoke the GetFileContents method will continue to process other user instructions, and displays the results as soon as the GetFileContents method finishes processing.

What should you do?

A. Use the following code:

GetFileContentsDel delAsync = new GetFileContentsDel (GetFileContents); IAsyncResult result = delAsync.BeginInvoke (null, null); while (!result.IsCompleted)

{

//Process other user instructions

}

string strFile – delAsync.EndInvoke (result);

B. Use the following code:

GetFileContentsDel delAsync = new GetFileContentsDel (GetFileContents); string strFile – delAsync.Invoke ();

C. Use the following code:

string strFile – delAsync.Invoke ();

D. Use the following code:

GetFileContentsDel delAsync = new GetFileContentsDel (GetFileContents); IAsyncResult result = delAsync.BeginInvoke (null, null); //Process other user instructions string strFile – delAsync.EndInvoke (result);

Correct Answer: A

 

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

Comments are closed.