Prev: How can an assembly work without the SequrityPermission thatgive it execute permission
Next: LINQ -able objects?
From: Tony Johansson on 23 May 2010 07:31 Hi! I have counted the number of Permission in .NET to 32. So according to the documentation when I use RequestOptional for a specified permission it means that I will so to speak give away all but the one that I have specified. So in this simple use of declarative permission on the assembly level it will mean that I have given away 30 permission because I have specified that I will use these two UIPermission and FileIOPermission [assembly: UIPermission(SecurityAction.RequestOptional, Unrestricted = true)] [assembly: FileIOPermission(SecurityAction.RequestOptional, ViewAndModify = @"C:\Hello.txt")] Before I made the test of these declarative permissions I changed My_Computer_Zone from FullTrust to Everything I must have missunderstood something here because I can still run the assembly containing these declarative permission. So I want to understand what is happening when I use RequestOptional because it doesn't work as the documantation says it should. //Tony |