Welcome to MSDN Blogs Sign in | Join | Help

August 2004 - Posts

New ILAsm Support For Assembly-Level Security

Before Whidbey shipped, using assembly level declarative security was always a bit of a pain. Previous versions of the CLR required you to provide security attributes in the form of XML, which meant that you would have to figure out the exact XML represented
Posted by shawnfa | 1 Comments
Filed under: , ,

Assembly Level Declarative Security

Assembly level declarative security comes in three forms, RequestMinimum, RequestOptional, and RequestRefuse. The three can be briefly defined as: RequestMinimum -- the set of permissions that are absolutely required for this assembly to run RequestOptional
Posted by shawnfa | 20 Comments
Filed under: ,

All About Assert Part IV: When Assert Won't Help

In Assert Myth #7 , I mention three ways for a demand for a permission to fail even though that permission was asserted. The first three are: Myth #3: You don't need the permissions that you're asserting in order to effectively assert them Myth #4: Assert
Posted by shawnfa | 1 Comments
Filed under: ,

All About Assert Part III: Dispelling the Myths

So far we've seen What Assert Actually Does , and What Assert Is Good For , now its time to examine some popular misconceptions about the Assert stack modifier. Myth #1: Assert changes an assembly's permission grant Assert is a stack walk modifier. It
Posted by shawnfa | 7 Comments
Filed under: ,

All About Assert Part II: What Assert Is Good For

Now that we know what Assert does , lets figure out what it's good for. The two most common uses of Assert are: Perform high-privilege operations on behalf of untrusted code Convert one permission demand to another Yesterday's example demonstrating what
Posted by shawnfa | 1 Comments
Filed under: ,

All About Assert Part I: What Assert Actually Does

There are several common misconceptions about the Assert stack modifier, not the least of which are: Assert changes an assembly's permission grant Assert is just a perf optimization You don't need the permissions that you're Asserting in order to effectively
Posted by shawnfa | 11 Comments
Filed under: ,

Post Build Assembly Modification Or: Why Won't SN -Vr Work on Tampered Assemblies

A while back I wrote about delay signing an assembly, and using SN -Vr to register that assembly to have its signature verification skipped. However, some people have noticed that SN -Vr doesn't work if you fully sign an assembly and then tamper with
Posted by shawnfa | 1 Comments

SafeHandle

Prior to Whidbey, interop with Win32 handles was done by passing IntPtrs back and forth through P/Invoke. This had several drawbacks including: Lack of type safety. Nothing is preventing me from taking an IntPtr containing a HWND and passing it to a method
Posted by shawnfa | 11 Comments

Serializing Permissions Across CLR Versions

An interesting question came up in the newsgroups today. If you serialize a permissions set (either by calling ToXml().ToString() directly on the permission, or by converting to an XML Element ), you'll get permissions that look like this: <IPermission
Posted by shawnfa | 4 Comments
Filed under: , ,

Matt Pietrek on How Iterators Work

One of the things on my blog todo list was to write an entry showing how C# iterators work under the hood. Well, Matt Pietrek beat me too it. You can find an exploration of the state machine that the C# compiler generates for you when you create an iterator
Posted by shawnfa | 0 Comments
Filed under:
 
Page view tracker