1
vote
Cannot access members of System.AppDomain in Silverlight

Description

"System.AppDomain.CurrentDomain" throws an exception saying "SystemError: Application code cannot access System.AppDomain.get_CurrentDomain() using Reflection." This needs to be fixed in IronPython by having a list of restricted types, and generating IL to access them instead of using Reflection.

This is related to 16485, but different.

The workaround is to use code like this:

for i in xrange(1000):
try:
System.AppDomain.CurrentDomain
except: pass
else: break

# now you can call System.AppDomain.CurrentDomain

File Attachments

No files are attached

Comments

wrote Apr 27 at 6:27 AM
Dino, does a "restricted type list", for generating IL for access to them instead of Reflection, exist in IronPython yet? If so, just let me know and I'll fix this, otherwise this bug should be about creating that list ...

Updating...
© 2006-2010 Microsoft | Get Help | Privacy Statement | Terms of Use | Code of Conduct | Advertise With Us | Version 2010.7.20.17027