Export (0) Print
Expand All

IStackWalk Interface

Manages the stack walk that determines whether all callers in the call stack have the required permissions to access a protected resource.

Namespace:  System.Security
Assembly:  mscorlib (in mscorlib.dll)

[ComVisibleAttribute(true)]
public interface IStackWalk

The IStackWalk type exposes the following members.

  NameDescription
Public methodAssertAsserts that the calling code can access the resource identified by the current permission object, even if callers higher in the stack have not been granted permission to access the resource.
Public methodDemandDetermines at run time whether all callers in the call stack have been granted the permission specified by the current permission object.
Public methodDenyCauses every Demand for the current object that passes through the calling code to fail.
Public methodPermitOnlyCauses every Demand for all objects except the current one that passes through the calling code to fail, even if code higher in the call stack has been granted permission to access other resources.
Top

Partially trusted code always presents a security risk. It can sometimes be manipulated to perform actions on behalf of malicious code that does not have permission to access a resource. In this way, malicious code can achieve higher security access than it should be allowed.

The common language runtime helps protect managed code from these attacks by running a stack walk on all calls. The stack walk requires that all code in the call stack has permission to access a protected resource. Because the code attempting the attack will always be somewhere in the call stack, it will be unable to exceed its own security permissions.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft