nerdexam
GIAC

GSSP-NET · Question #6

You work as a Software Developer for ABC Inc. The company uses Visual Studio .NET as its application development platform. You create a class library using the .NET Framework. The library will be…

The correct answer is D. CodeAccessPermission.RevertAssert(). GIAC GSSP-.NET Exam

Secure Coding Principles and Methodologies

Question

You work as a Software Developer for ABC Inc. The company uses Visual Studio .NET as its application development platform. You create a class library using the .NET Framework. The library will be used to open the NSCs of computers. Later, you will set up the class library to the GAC and provide it Full Trust permission. You write down the following code segments for the socket connections:

SocketPermission permission = new SocketPermission(PermissionState.Unrestricted); permission.Assert(); A number of the applications that use the class library may not have the necessary permissions to open the network socket connections. Therefore, you are required to withdraw the assertion. Which of the following code segments will you use to accomplish the task?

Options

  • Apermission.PermitOnly();
  • BCodeAccessPermission.RevertDeny();
  • Cpermission.Deny();
  • DCodeAccessPermission.RevertAssert();
  • Epermission.Demand();

How the community answered

(68 responses)
  • A
    13% (9)
  • B
    6% (4)
  • C
    1% (1)
  • D
    76% (52)
  • E
    3% (2)

Explanation

GIAC GSSP-.NET Exam

Topics

#code access security#RevertAssert#permission assertion#CAS stack walk

Community Discussion

No community discussion yet for this question.

Full GSSP-NET Practice