c# - Can't understand SecurityManager.IsGranted() -


I have deliberately reduced the permissions for a method whether the IsGranted method works, but it is not. Here is my code: [FileIopermission (SecurityAction.Deny, Read = "d: \\ faz.txt")] Zero method () {Console.WriteLine (SecurityManager.IsGranted (New FileIopermission) (FileIOPermissionAccess.Read, "d: \\ faz.txt"))); }

The method returns even if this method has never allowed. Anyone can tell about this problem.

I do not think you are using it correctly to make you a new example of fileIIapmission Not required and use one for the method to apply.

Which one goes to another problem If your safety is working properly, how can this method execute?


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -