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!

IPermission.DemandImmediate

Demands at run-time that the immediate caller of the code that calls this method has the permission.

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

Exceptions

Exception Type Condition
SecurityException The immediate caller does not have the permission demanded.

Remarks

Since this method only checks the permissions of the immediate caller, it is only appropriate for enforcement of security when all callers of the code can be trusted to not expose security vulnerabilities. Specifically, the code must take other measures to protect against luring attacks, where malicious code without the permission "tricks" other code that does have the permission into making a call.

See Also

IPermission Interface | IPermission Members | System.Security Namespace