Code Access Security - Demands

Demands

Code that performs some privileged action will make a demand for one or more permissions. The demand makes the CLR walk the call stack and for each method the CLR will ensure that the demanded permissions are in the method's assembly's granted permissions. If the permission is not granted then a security exception is thrown. This prevents downloaded code from performing privileged actions. For example, if an assembly is downloaded from an untrusted site the assembly will not have any file IO permissions and so if this assembly attempts to access a file code access security will throw an exception preventing the call.

Read more about this topic:  Code Access Security

Famous quotes containing the word demands:

    To exercise power costs effort and demands courage. That is why so many fail to assert rights to which they are perfectly entitled—because a right is a kind of power but they are too lazy or too cowardly to exercise it. The virtues which cloak these faults are called patience and forbearance.
    Friedrich Nietzsche (1844–1900)

    It is hardly surprising that children should enthusiastically start their education at an early age with the Absolute Knowledge of computer science; while they are unable to read, for reading demands making judgments at every line.... Conversation is almost dead, and soon so too will be those who knew how to speak.
    Guy Debord (b. 1931)

    The foreground in a picture is always unattractive ... Art demands that the interest of the canvas should be placed in the far distance, where lies take refuge, those dreams which blossom out of fact and are man’s only love.
    Louis-Ferdinand Céline (1894–1961)