Salient Solutions

wrasslin ones and nones for fun and profit - Sky Sanders' Blog
Get your own ranked flair here
posts - 88, comments - 54, trackbacks - 0

Monday, March 08, 2010

Request for the permission of type System.Security.Permissions.EnvironmentPermission failed.

 Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

I have been working on an AppDomain sandbox and was plagued with permission failures where there should be none, namely at the constructor of a type being activated with CreateInstanceFrom, which should allow an Unrestricted permission assert in the constructor, even in a restricted AppDomain.

Ultimately I set exceptions to break and drilled down into the failed permission assert and noticed Read="AutoFakeEnabled".

This smelled like Typemock getting in my way and sure enough disabling Typemock resolved the issue.

I am not going to quantify the lost time, it would be embarassing, but it does raise some usability issues regarding Typemock.

 

posted @ Monday, March 08, 2010 3:57 PM | Feedback (1) |

Powered by: