PC Review


Reply
Thread Tools Rate Thread

FileIOPermission usage

 
 
=?Utf-8?B?dHRydWRlYXU=?=
Guest
Posts: n/a
 
      15th Feb 2007
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?


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
FileIOPermission Help Dave Microsoft ASP .NET 2 19th Oct 2008 02:55 PM
Help - How am I misusing FileIOPermission? innes Microsoft Dot NET Framework Forms 0 18th Aug 2008 03:59 PM
FileIOPermission Emil Microsoft C# .NET 10 31st Dec 2006 12:08 PM
FileIOPermission question schaf Microsoft C# .NET 6 23rd Jun 2006 04:48 PM
FileIOPermission =?Utf-8?B?YW5kcmV3Y3c=?= Microsoft C# .NET 4 27th Jul 2005 02:45 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:18 AM.