I've been hearing conflicting facts about this topic. What is correct?
You've been hearing conflicting views because it's a topic of great confusion, even among senior engineers. In short, simply placing an assembly in the GAC does implicitly give it full trust, but this can be overriden via security policy.
EDIT1: Let me add that a common thought is if you don't trust an assembly fully, why are you placing it in the GAC?
EDIT2: I had a link in here to a blog post from Michelle Bustamante, but as you can see in the comment below, it's no longer available so I removed it from this answer.
I'll try to give an example that may help clear things up. Let's say you have a web app that runs medium trust. It needs to do something that requires full trust, so you create a class library project (assembly) to do that task and install it to the GAC. In testing, the new assembly performs it's function flawlessly, but when you try to use it in your web app, you discover that you still only have medium trust.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With