Incorrect Answers

B: The Certificate Creation tool generates X.509 certificates for testing purposes only. C: We should use a Software Publisher Certificate, not a X.509 certificate.

E: The Software Publisher Certificate Test tool creates a Software Publisher's Certificate (SPC) from one or more X.509 certificates. Cert2spc.exe is for test purposes only.

QUESTION NO: 11

You develop a Windows-based time and billing application named TestKingBilling. You create a simple user interface to capture user-entered data.

The application passes an Object array of user-entered values to a function named AddUpDataTimeEntry. This function uses the LoadDataRow method of the Data Table object either to update an existing record in the table or to add a new record.

When you test TestKingBilling, you frequently receive an exception of type InvalidCastException. What us the cause of this error?

A. You are trying to load a duplicate value into a Data Table column that has a unique constraint.

B. The number of items in your Object array does not match the number of columns in the Data Table object.

C. The data that you are trying to load into a column is not the correct data type specified for that column.

D. The columns in your Data Table object do not have the AllowDBNull property set to True.

Answer: C

Explanation: InvalidCastException Class implements the exception that is thrown for invalid casting or explicit conversion. An InvalidCastException could be caused by an incorrect data type.

QUESTION NO: 12

You use Visual Studio .NET to create an assembly that will be consumed by other Visual Studio .NET applications. No Permissions should be granted to this assembly unless the assembly makes a minimum permission request for them. Which code segment should you use?

PermissionSet(SecurityAction.PermitOnly, _ Unrestricted := True)>

PermissionSet(SecurityAction.PermitOnly, _ Unrestricted := False)>

PermissionSet(SecurityAction.RequestOptional,_ Unrestricted := True)>

PermissionSet(SecurityAction.RequestOptional, _ Unrestricted := False)>

Answer: C

Explanation: The RequestOptional SecurityAction requests for additional permissions that are optional (not required to run). This action can only be used within the scope of the assembly. The assembly must have permission to request additional permission.

Reference:

.NET Framework Developer's Guide Requesting Optional Permissions [Visual Basic] .NET Framework Class Library, SecurityAction Enumeration [Visual Basic]

Incorrect Answers:

A, B: The PermitOnly SecurityAction does not support Assembly as a target, it only supports Class or Method as targets.

D: The assembly must be able to request additional permissions.

QUESTION NO: 13

Your company TestKing Inc. standardizes on the .NET Framework as its software development platform. Subsequently, virus attacks cause your company to prohibit the execution of any applications downloaded from the Internet.

You must ensure that all client computers on your intranet can execute all .NET applications originating from your company. You must also ensure that the execution of .NET applications downloaded from the Internet is prohibited. You must expend the minimum amount of administrative effort to achieve your goal.

Which policy should you modify?

A. Application Domain.

B. Enterprise

C. Machine

D. User

Answer: B

Explanation: An Enterprise policy applies to the whole domain of the company. It would require minimal administrative effort to set up.

Reference: .NET Framework Developer's Guide Security Policy Administration Overview Incorrect Answers:

A: An Application Domain policy is defined by the runtime host (any application that hosts the common language runtime) for setting load-time policy. This level cannot be administered. C: A machine policy only applies to a single machine. D: A user policy only applies to a single user.

QUESTION NO: 14

You create a user control named ScrollControl, which you plan to sell to developers. You want to ensure that ScrollControl can be used only by developers who purchase a license to use it. You decide to use a license provider implemented by the LicFileLicenseProvider class. Now you need to add code to ScrollControl to test for a valid control license.

Which two code segments should you add? (Each correct answer presents part of the solution. Choose two)

A. <LicenseProvider(GetType(LicFileLicenseProvider))>

B. <LicenseProvider(GetType(ScrollControl))>

C. In the Load event handler for ScrollControl, place the following code segment:

LicenseManager.Validate(GetType(ScrollControl)) Catch ex As Exception

'Insert code to disallow use. End Try

D. In the Load event handler for ScrollControl, place the following code segment:

Dim ControlLicense As License ControlLicense = _

LicenseManager.Validate(GetType(ScrollControl), Me) Catch ex As Exception

'Insert code to disallow use. End Try

E. In the Load event handler for ScrollControl, place the following code segment:

Dim bLicensed As Boolean bLicensed = _

LicenseManager.IsValid(GetType(ScrollControl)) Catch ex As Exception

'Insert code to disallow use. End Try

F. In the Load event handler for ScrollControl, place the following code segment:

Dim bLicensed As Boolean Dim ControlLicense As License bLicensed = _

LicenseManager.IsValid(GetType(ScrollControl),Me, _ ControlLicense)

Catch ex As Exception

'Insert code to disallow use. End Try

Explanation: To enable licensing for your component

1. Apply a LicenseProviderAttribute to the LicFileLicenseProvider class. This is A).

2. Call LicenseManager.Validate or LicenseManager.IsValid in the constructor. This is D).

A: When you create a component that you want to license, you must specify the LicenseProvider by marking the component with a LicenseProviderAttribute. This is accomplished by: <LicenseProvider(GetType(LicFileLicenseProvider))> D: LicenseManager.Validate produces a license. The correct code to handle this is: Dim ControlLicense As License

ControlLicense = LicenseManager.Validate(GetType(ScrollControl), Me) Reference:

.NET Framework Developer's Guide, Licensing Components and Controls [Visual Basic] .NET Framework Class Library, LicenseProviderAttribute Class [Visual Basic]

Incorrect Answers

B: The LicFileLicenseProvider class, not ScrollControl class must be used. C: The result of LicenseManager.Validate must be caught in a license variable.

E, F: The result of LicenseManager.Validate must be caught in a license variable, not a Boolean variable

QUESTION NO: 15

As a software developer at TestKing inc. you use Visual Studio .NET to create a Windows-based application. You need to make the application accessible to users who have low vision. These users navigate the interface by using a screen reader, which translates information about the controls on the screen into spoken words. The screen reader must be able to identify which control currently has focus. One of the TextBox controls in your application enables users to enter their names. You must ensure that the screen reader identifies this TextBox control by speaking the word "name" when a user changes focus to this control.

Which property of this control should you configure?

A.

Tag

B.

Next

C.

Name

D.

AccessibleName

E.

AccessibleRole

Answer: D

Explanation: The AccessibleName property is the name that will be reported to the accessibility aids. Reference:

Visual Basic and Visual C# Concepts, Providing Accessibility Information for Controls on a Windows Form Visual Basic and Visual C# Concepts, Walkthrough: Creating an Accessible Windows Application

0 0

Post a comment