<div>The following code works for me under B1, but throws an exception under B2:</div>
<div> </div>
<div><font face="courier new,monospace">import clr<br>import System<br>name = System.Reflection.AssemblyName()<br>name.Name = 'Test'<br>assemblyBuilder = System.AppDomain.CurrentDomain.DefineDynamicAssembly(name, System.Reflection.Emit.AssemblyBuilderAccess.Run)<br>
</font></div>
<div> </div>
<div>The stack trace is, of course, entirely inside the CLR.</div>
<div> </div>
<div>Traceback (most recent call last):<br> File "<stdin>", line 1, in <module><br> File "mscorlib", line unknown, in DefineDynamicAssembly<br> File "mscorlib", line unknown, in InternalDefineDynamicAssembly<br>
File "mscorlib", line unknown, in nCreateDynamicAssembly<br> File "mscorlib", line unknown, in CheckGrantSetHelper<br>SystemError: Object reference not set to an instance of an object.</div>
<div> </div>
<div>Unfortunately, nCreateDynamicAssembly is an InternalCall, so I can't see exactly what it's doing. The only object reference in CheckGrantSetHelper is to a PermissionSet, presumably one of the three that are passed to nCreateDynamicAssembly. Based on the methods higher in the stack, I expect that all three PermissionSets passed to nCreateDynamicAssembly are null, but this would have been true under B1 as well.</div>
<div> </div>
<div>Have there been security-related changes made that could cause this problem?</div>
<div> </div>
<div>--</div>
<div>Curt Hagenlocher</div>
<div><a href="mailto:curt@hagenlocher.org">curt@hagenlocher.org</a></div>