1. Question: Your user account has Read access to a file named Text.txt. You run an assembly in the My_Computer_Zone code group, which grants it the FullTrust permission set. Which of the following actions can the assembly perform on the file?

    A
    Read

    B
    Write

    C
    Change permissions

    D
    Delete

    Note: Not available
    1. Report
  2. Question: An administrator runs the following Console application on a computer running Windows XP with the Everything permission set. What is the output from the application?

    <Assembly: UIPermission(SecurityAction.RequestOptional, _
    Unrestricted:=True)>
    <Assembly: FileIOPermissionAttribute(SecurityAction.RequestOptional, _
    Read:="C:\")>
    <Assembly: FileIOPermissionAttribute(SecurityAction.RequestRefuse, _
    Read:="C:\Windows\")>
    Module Module1
    Sub Main()
    Console.WriteLine("Reading one line of the boot.ini file:")
    Dim sr As StreamReader = New StreamReader("C:\boot.ini")
    Console.WriteLine("First line of boot.ini: " + sr.ReadLine)
    End Sub
    End Module

    A
    Unhandled Exception: System.Security.SecurityException: Request for the
    permission of type 'System.Security.Permissions.
    FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral,
    PublicKeyToken=b77a5c561934e089' failed.

    B
    Reading one line of the boot.ini file:
    Unhandled Exception: System.Security.SecurityException: Request for the
    permission of type 'System.Security.Permissions.
    FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral,
    PublicKeyToken=b77a5c561934e089' failed.

    C
    Reading one line of the boot.ini file:
    First line of boot.ini: [boot loader]

    D
    An unhandled SecurityException occurs before the application begins execution.

    Note: Not available
    1. Report
  3. Question: An administrator runs the following Console application on a computer running Windows XP with the Everything permission set. What is the output from the application?

    <Assembly: UIPermission(SecurityAction.RequestOptional, _
    Unrestricted:=True)>
    <Assembly: FileIOPermissionAttribute(SecurityAction.RequestOptional, _
    Read:="C:\Temp")>
    <Assembly: FileIOPermissionAttribute(SecurityAction.RequestRefuse, _
    Read:="C:\Windows\")>
    Module Module1
    Sub Main()
    Console.WriteLine("Reading one line of the boot.ini file:")
    Dim sr As StreamReader = New StreamReader("C:\boot.ini")
    Console.WriteLine("First line of boot.ini: " + sr.ReadLine)
    End Sub
    End Module

    A
    Unhandled Exception: System.Security.SecurityException: Request for the
    permission of type 'System.Security.Permissions.
    FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral,
    PublicKeyToken=b77a5c561934e089' failed.

    B
    Reading one line of the boot.ini file:
    Unhandled Exception: System.Security.SecurityException: Request for the
    permission of type 'System.Security.Permissions.
    FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral,
    PublicKeyToken=b77a5c561934e089' failed.

    C
    Reading one line of the boot.ini file:
    First line of boot.ini: [boot loader]

    D
    An unhandled SecurityException occurs before the application begins execution.

    Note: Not available
    1. Report
  4. Question: An administrator runs the following Console application on a computer running Windows XP with the Everything permission set. What is the output from the application?

    <Assembly: UIPermission(SecurityAction.RequestMinimum, Unrestricted:=True)>
    <Assembly: FileIOPermissionAttribute(SecurityAction.RequestMinimum, _
    Read:="C:\Temp")>
    <Assembly: FileIOPermissionAttribute(SecurityAction.RequestRefuse, _
    Read:="C:\Windows\")>
    Module Module1
    Sub Main()
    Console.WriteLine("Reading one line of the boot.ini file:")
    Dim sr As StreamReader = New StreamReader("C:\boot.ini")
    Console.WriteLine("First line of boot.ini: " + sr.ReadLine)
    End Sub
    End Module

    A
    Unhandled Exception: System.Security.SecurityException: Request for the
    permission of type 'System.Security.Permissions.
    FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral,
    PublicKeyToken=b77a5c561934e089' failed.

    B
    Reading one line of the boot.ini file:
    Unhandled Exception: System.Security.SecurityException: Request for the
    permission of type 'System.Security.Permissions.
    FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral,
    PublicKeyToken=b77a5c561934e089' failed.

    C
    Reading one line of the boot.ini file:
    First line of boot.ini: [boot loader]

    D
    An unhandled SecurityException occurs before the application begins execution.

    Note: Not available
    1. Report
  5. Question: Which of the following permissions is required for all Console applications running with a debugger?

    A
    SocketPermission

    B
    WebPermission

    C
    UIPermission

    D
    FileIOPermission

    Note: Not available
    1. Report
  6. Question: Which of the following would you use to throw an exception before method execution begins if a caller lacked a specific privilege?

    A
    SecurityAction.Demand

    B
    SecurityAction.Deny

    C
    SecurityAction.Assert

    D
    SecurityAction.RequestMinimum

    Note: Not available
    1. Report
  7. Question: You have created a FileIOPermission object named fp. Which method would you use to determine whether the current assembly had a specific permission without throwing an exception?

    A
    fp.Deny

    B
    fp.IsGranted

    C
    SecurityManager.Deny(fp)

    D
    SecurityManager.IsGranted(fp)

    Note: Not available
    1. Report
  8. Question: Given the following code, which statement would reverse the security restriction? (Choose all that apply.)
    Dim e As EventLogPermission = _
    New EventLogPermission (PermissionState.Unrestricted)
    e.PermitOnly

    A
    e.RevertPermitOnly()

    B
    CodeAccessPermission.RevertPermitOnly()

    C
    e.RevertAll()

    D
    CodeAccessPermission.RevertAll()

    E
    e.RevertDeny()

    F
    CodeAccessPermission.RevertDeny()

    Note: Not available
    1. Report
  9. Question: You are creating a class library that connects to an intranet Web server. You plan to deploy the class library to the global assembly cache (GAC) with full trust. You add the following code:
    Dim connectPattern As Regex = New Regex("http://intranet\.contoso\.com/.*")
    Dim webPermissions As WebPermission = _
    New WebPermission(NetworkAccess.Connect, connectPattern)
    webPermissions.Assert()
    Which method should you call to cancel the assertion?

    A
    webPermissions.PermitOnly()

    B
    webPermissions.Deny()

    C
    CodeAccessPermission.RevertAssert()

    D
    CodeAccessPermission.RevertDeny()

    Note: Not available
    1. Report
  10. Question: You must restrict access to a method based on a user’s group memberships in the local user database. You want to use the most secure method possible. Which technique will you use?

    A
    WindowsPrincipal.IsInRole

    B
    WindowsIdentity.IsInRole

    C
    Imperative RBS demands

    D
    Declarative RBS demands

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