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:
“When the doctrine of allegiance to party can utterly up-end a mans moral constitution and make a temporary fool of him besides, what excuse are you going to offer for preaching it, teaching it, extending it, perpetuating it? Shall you say, the best good of the country demands allegiance to party? Shall you also say it demands that a man kick his truth and his conscience into the gutter, and become a mouthing lunatic, besides?”
—Mark Twain [Samuel Langhorne Clemens] (18351910)
“The country needs and, unless I mistake its temper, the country demands bold, persistent experimentation. It is common sense to take a method and try it. If it fails, admit it frankly and try another. But above all, try something. The millions who are in want will not stand idly by silently forever while the things to satisfy their needs are within easy reach.”
—Franklin D. Roosevelt (18821945)