NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

IStackWalk.PermitOnly

Ensures that only the resources specified by this permission object can be accessed, even if the code has been granted permission to access other resources.

[Visual Basic]
Sub PermitOnly()
[C#]
void PermitOnly();
[C++]
void PermitOnly() = 0;
[JScript]
function PermitOnly();

Remarks

Permit-only is a variant on deny, in that both cause stack walks to fail where they might otherwise succeed. The difference is that deny specifies permissions to fail stack walk on, where permit-only specifies the only permissions that are to succeed with all others failing.

A common use for permit-only is to supply a specific set of permissions that code wishes to restrict itself to, rather than specifying the permissions it has that it wants to deny. You can call this method to ensure that your code can be used to access only the resources you specify in your call(s) to PermitOnly. A permit-only is in effect until another permit-only or return from the method. Also, RevertPermitOnly or RevertAll will remove a pending permit-only.

See Also

IStackWalk Interface | IStackWalk Members | System.Security Namespace