PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Framework
FileIOPermission usage
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Framework
FileIOPermission usage
![]() |
FileIOPermission usage |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
I read in an old response to a question about the FileIOPermission (from May
5, 2006) that you could use the security imperatively using something like: FileIOPermission perm = new FileIOPermission(FileIOPermissionAccess.Read, path); perm.Demand(); However, code analysis barks at this method with the following: CA2103 A method uses imperative security and might be constructing the permission using state information or return values that can change while the demand is active. So, how exactly should we employ demands when the path changes as the method is called? |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

