I've just read the following in the CLI specification regarding SecurityExceptions upon method calls:
The security check can occur when the CIL is converted to native code rather than at runtime.
How does Microsoft's implementation handle this?
If, for example, only a certain usergroup is allowed to access some class, and i have placed a security attribute checking for this group.
If the user runs the application, it is jitted, and possibly the security checks are performed at that time and not at runtime.
If so, does the jitter cache the native image so that it could pose problems if i change the user's group at a later time (i.e. the cached native image doesn't reflect his updated permissions)? Or is it jitted every time it is run unless i preinstall the native image? I'm still not quite sure how the native image cache works exactly.