1. Question: 

    You are creating a new security policy for an application domain. You write the following lines of code.

    Dim objPolicy As PolicyLevel = PolicyLevel.CreateAppDomainLevel

    Dim noTrustStatement As New PolicyStatement( _

    objPolicy.GetNamedPermissionSet("Nothing"))

    Dim fullTrustStatement As New PolicyStatement( _

    objPolicy.GetNamedPermissionSet("FullTrust"))

    You need to arrange code groups for the policy so that loaded assemblies default to the Nothing permission set. If the assembly originates from a trusted zone, the security policy must grant the assembly the FullTrust permission set.

    Which code segment should you use?

    A
    Dim objGroup As CodeGroup = New UnionCodeGroup( _
    New ZoneMembershipCondition(SecurityZone.Trusted), _ fullTrustStatement)

    B
    Dim objGroup1 As CodeGroup = New FirstMatchCodeGroup( _ New AllMembershipCondition, noTrustStatement)
    Dim objGroup2 As CodeGroup = New UnionCodeGroup( _
    New ZoneMembershipCondition(SecurityZone.Trusted), _ fullTrustStatement)

    C
    Dim objGroup As CodeGroup = New FirstMatchCodeGroup( _ New ZoneMembershipCondition (SecurityZone.Trusted), _ fullTrustStatement)

    D
    Dim objGroup1 As CodeGroup = New FirstMatchCodeGroup( _ New ZoneMembershipCondition (SecurityZone.Trusted), _ fullTrustStatement)
    "A Composite Solution With Just One Click" - Certification Guaranteed 190 Microsoft 70-536 Exam
    Dim objGroup2 As CodeGroup = New UnionCodeGroup( _
    New AllMembershipCondition,noTrustStatement)

    Note: Not available
    1. Report
  2. Question: You are writing a custom dictionary. The custom-dictionary class is named MyDictionary. You need to ensure that the dictionary is type safe. Which code segment should you use?

    A
    Class MyDictionary
    ...
    End Class
    Dim t As New Dictionary(Of String, String)
    Dim dict As MyDictionary = CType(t, MyDictionary)

    B
    Class MyDictionary
    Implements IDictionary

    C
    Class MyDictionary
    Inherits HashTable

    D
    Class MyDictionary
    Implements Dictionary(Of String, String)

    Note: Not available
    1. Report
  3. Question: You write the following class. Public Class HomePage Public CurrentHeadlines As StringBuilder Private WelcomeMessage As String Dim Stocktickers As Array Dim PriorityList As Dictionary(Of Int32, String) End Class You need to generate a type library for this class. The type library will be used by unmanaged code. Which member should you update?

    A
    Dim PriorityList As Dictionary(Of Int32, String)

    B
    Public CurrentHeadlines As StringBuilder

    C
    Private WelcomeMessage As String

    D
    Dim Stocktickers As Array

    Note: Not available
    1. Report
  4. Question: 

    You are developing a routine that will periodically perform a calculation based on regularly changing values from legacy systems. You write the following lines of code.

    01 Dim exitLoop As Boolean = False

    02 Do 04 exitLoop = PerformCalculation()

    05 Loop While Not exitLoop

    You need to write a code segment to ensure that the calculation is performed at 30-second intervals.

    You must ensure that minimum processor resources are used between the calculations. Which code segment should you insert at line 03?

    A
    Thread.Sleep(30000);

    B
    Thread.SpinWait(30);

    C
    Thread.SpinWait(30000);

    D
    Dim thrdCurrent As Thread = Thread.CurrentThread;
    thrdCurrent.Priority = ThreadPriority.Lowest;

    E
    Dim thrdCurrent As Thread = Thread.CurrentThread;
    thrdCurrent.Priority = ThreadPriority.BelowNormal;

    Note: Not available
    1. Report
  5. Question: You need to write a code segment that transfers the first 80 bytes from a stream variable named stream1 into a new byte array named byteArray. You also need to ensure that the code segment assigns the number of bytes that are transferred to an integer variable named bytesTransferred. Which code segment should you use?

    A
    stream1->Write(byteArray, 0, 80); bytesTransferred = byteArray->Length;

    B
    bytesTransferred = stream1->Read(byteArray, 0, 80);

    C
    while (bytesTransferred < 80) {
    stream1->Seek(1, SeekOrigin::Current);
    byteArray[bytesTransferred++] =
    Convert::ToByte(stream1->ReadByte());
    "A Composite Solution With Just One Click" - Certification Guaranteed 194 Microsoft 70-536 Exam
    }

    D
    for (int i = 0; i < 80; i++) {
    stream1->WriteByte(byteArray[i]);
    bytesTransferred = i;
    if (!stream1->CanWrite) {
    break;
    }
    }

    Note: Not available
    1. Report
  6. Question: 

    You are developing an application to assist the user in conducting electronic surveys. The survey consists of 25 true-or-false questions. You need to perform the following tasks:

    · Initialize each answer to true.

    · Minimize the amount of memory used by each survey.

    Which storage option should you choose?

    A
    Dim answers As New BitArray (1)

    B
    Dim answers As New BitVector32(-1)

    C
    Dim answers As New BitArray (-1)

    D
    Dim answers As New BicVector32(1)

    Note: Not available
    1. Report
  7. Question: 

    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
    Grant the full trust permission set to the Trusted Zone code group by using the Code Access Security Policy tool (Caspol.exe).

    B
    Use the security settings of Internet Explorer to add the shared folder to the list of trusted sites.

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

    D
    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 applications reside.

    Note: Not available
    1. Report
  8. Question: 

    You are creating an assembly that interacts with the file system.

    You need to configure a permission request so that the common language runtime (CLR) will stop loading the assembly if the necessary file permissions are absent.

    Which attribute should you place in your code?

    A
    <Assembly: FileIOPermission( SecurityAction.RequestOptional,_ AllLocalFiles: FileIOPermissionAccess.Read) >

    B
    <Assembly: FileIOPermission( SecurityAction.RequestOptional,_ AllFiles=FileIOPermissionAccess. Read)_ >

    C
    <Assembly: FileIOPermission( SecurityAction.RequestMinimum,_ AllLocalFiles:= FilelOPermissionAccess.Read)_ >

    D
    <Assembly: FileIOPermission( SecurityAction.RequestRefuse,_ AllLocalFiies:= FilelOPermissionAccess.Read)_ >

    Note: Not available
    1. Report
  9. Question: 

    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.

    Dim blnAdmin As Boolean = False

    Dim objRole As WindowsBuiltlnRole =

    WindowsBuiltInRole.Administrator

    If blnAdmin = False Then

    Throw New Exception("User not permitted")

    End If

    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
    Dim objUser As UindowsPrincipal =
    DirectCast(Thread.CurrentPrincipal, WindowsPrincipal) blnAdmin = objUser.IsInRole(objRole)

    B
    Dim objUser As GenericPrincipal =
    DirectCast(Thread.CurrentPrincipal, GenericPrincipal) blnAdmin = objUser.IsInRole(objRole.ToString)

    C
    Dim objUSer As Windowsldentity =
    DirectCast(Thread.CurrentPrincipal.Identity, Windowsldentity) blnAdmin = objUSer.Name.EndsUith ("Administrator")

    D
    Dim objUser As WindowsIdentity = WindowsIdentity.GetCurrent For Each objGroup As IdentityReference In objUser.Groups Dim objAccount As NTAccount =
    DirectCast(objGroup.Translate(
    Type.GetType("NTAccount")),NTAccount)
    blnAdmin = objGroup.Value.Equals(objRole)
    Next

    Note: Not available
    1. Report
  10. Question: 

    You write the following class that has three methods.

    Public Class SimpleEmployee

    Private ni_EmployeeId As String

    Private m_EroployeeName As String

    Private m_JobTitleName As String

    Public Function GetID() As String

    Return m_EmpioyeeID

    End Function

    Public Function GetName() As String

    Return tti_EmployeeNatne

    End Function

    Public Function GetTitle() As String

    Return ra_JobTitleNarne

    End Function

    End Class

    You need to expose the class to COM in a type library. The COM interface must not expose the method GetEmployeeld. The GetEmployeeld method must still be available to managed code.

    You need to hide the GetEmployeelD method from the COM interface.

    What should you do?

    You need to expose the class to COM in a type library. The COM interface must not expose the method GetEmployeeld. The GetEmployeeld method must still be available to managed code.

    You need to hide the GetEmployeelD method from the COM interface.

    What should you do?

    A
    Apply the ComVisible attribute to the class and methods in the following manner.
    [<ComVisible(True)>_

    Public Class SimpleEmployee
    Private m_EmployeeId As String
    Private m_EmployeeName As String
    Private m_JobTitleNanne As String
    Public Function GetID() As String
    Return m_EroployeeId
    End Function
    <CowVisible(True)>
    Public Function GetName() As String
    Return ro_EroployeeName
    End Function
    <ComVisible(True)>
    Public Function GetTitle() As String
    Return m_JobTitleWame
    End Function
    End Class

    B
    Change the access modifier for the GetEmployeeld method in the following manner.
    <ComVisible(False)>_
    Public Class SimpleEmployee
    Private m_EmployeeId As String
    Private m_EmployeeName As String
    Private m_JobTitleName As String
    "A Composite Solution With Just One Click" - Certification Guaranteed 203 Microsoft 70-536 Exam Protected Function GetID() As String
    Return m_EmployeeID
    End Function
    Public Function GetName() As String
    Return m_EmployeeName 
    End Function

    Public Function GetTitle() As String
    Return m_JobTitleName
    End Function

    C
    Apply the ComVisible attribute to the class and methods in the following manner.
    <ComVisible(False)>
    Public Class SimpleEmployee
    Private m_EmployeeId As String
    Private ro_EmployeeNaine As String
    Private m_JobTitleName As String
    Public Function GetID() As String
    Return m_EroployeeId
    End Function
    <ComVisible(True)>
    Public Function GetName() As String
    Public Function GetName() As String
    Return m_EttiployeeName
    End Function
    <ComVisible(True)>
    Public Function GetTitle() As String
    Return m_JobTitleWame

    End Function
    End Class

    D
    Apply the CornVisible attribute to the GetEmployeeld method in the following manner.
    Public Class SimpleEmployee
    Private m_EmployeeId As String
    Private m_EmployeeName As String
    Private m_JobTitleName As String <CoroVisible(False) >_ Public Function GetID() As String Return m EmployeelD
    End Function
    Public Function GetName() As String
    Return m_EmployeeNaitie
    End Function
    Public Function GetTitlef) As String
    Return iti_JobTitleNanie
    End Function
    End Class

    Note: Not available
    1. Report
Copyright © 2024. Powered by Intellect Software Ltd