Click here to Skip to main content
15,898,924 members
Home / Discussions / C#
   

C#

 
GeneralRe: Porting to C# Pin
Giles29-Feb-04 0:15
Giles29-Feb-04 0:15 
GeneralResizing form background image Pin
Flack27-Feb-04 9:10
Flack27-Feb-04 9:10 
GeneralRe: Resizing form background image Pin
Heath Stewart27-Feb-04 9:59
protectorHeath Stewart27-Feb-04 9:59 
QuestionFileIOPermission also takes away UIPermission? Pin
Nathan Blomquist27-Feb-04 8:37
Nathan Blomquist27-Feb-04 8:37 
AnswerRe: FileIOPermission also takes away UIPermission? Pin
Heath Stewart27-Feb-04 9:38
protectorHeath Stewart27-Feb-04 9:38 
GeneralRe: FileIOPermission also takes away UIPermission? Pin
Nathan Blomquist27-Feb-04 11:21
Nathan Blomquist27-Feb-04 11:21 
GeneralRe: FileIOPermission also takes away UIPermission? Pin
Heath Stewart28-Feb-04 3:16
protectorHeath Stewart28-Feb-04 3:16 
GeneralRe: FileIOPermission also takes away UIPermission? Pin
Nathan Blomquist28-Feb-04 5:11
Nathan Blomquist28-Feb-04 5:11 
Heath Stewart wrote:
If you want anyone to be able to extend your application, then you're on the right track. Create an instance of the permission(s) and call Deny on the instance.

I would like others to develop plugins so that is why I wanted to deny things around the method calls into that plugin. I don't want plugins to be able to do anything evil and such to the user's computer or via the user's computer. The plugin should get all information from the program and that is it.

I have found this to work around the method declaration of the abstract plugin methods.

abstract class plugin
{  
   // override this to add functionality
   protected abstract void OnDoSomething();

   [FileIOPermission(SecurityAccess.Deny,Unrestricted=true)]
   public void DoSomething()
   {
      OnDoSomething();
   }

}


This will stop file accessing. But I found that the plugin derived from this can just do an FileIOPermission.Assert to get around this. Maybe I am thinking too much and there is no truly safe way to do these plugins.

Maybe at some point I have to trust my users...

Thanks again,
Nathan

---------------------------
Hmmm... what's a signature?
GeneralRe: FileIOPermission also takes away UIPermission? Pin
Heath Stewart28-Feb-04 5:25
protectorHeath Stewart28-Feb-04 5:25 
GeneralRe: FileIOPermission also takes away UIPermission? Pin
Nathan Blomquist28-Feb-04 6:34
Nathan Blomquist28-Feb-04 6:34 
GeneralUsercontrol as a container Pin
meago27-Feb-04 8:28
meago27-Feb-04 8:28 
GeneralRe: Usercontrol as a container Pin
Roger Alsing27-Feb-04 9:19
Roger Alsing27-Feb-04 9:19 
GeneralRe: Usercontrol as a container Pin
meago1-Mar-04 12:44
meago1-Mar-04 12:44 
GeneralGet wmv file information Pin
Matt Newman27-Feb-04 8:22
Matt Newman27-Feb-04 8:22 
GeneralRe: Get wmv file information Pin
Heath Stewart27-Feb-04 9:30
protectorHeath Stewart27-Feb-04 9:30 
GeneralCheckbox in Datagrid - check in one click Pin
Ruchi Gupta27-Feb-04 6:35
Ruchi Gupta27-Feb-04 6:35 
GeneralRe: Checkbox in Datagrid - check in one click Pin
Heath Stewart27-Feb-04 8:31
protectorHeath Stewart27-Feb-04 8:31 
Questioncolored lines in console?? Pin
oOomen27-Feb-04 6:32
oOomen27-Feb-04 6:32 
AnswerRe: colored lines in console?? Pin
Heath Stewart27-Feb-04 6:36
protectorHeath Stewart27-Feb-04 6:36 
GeneralRe: colored lines in console?? Pin
Uwe Keim27-Feb-04 7:40
sitebuilderUwe Keim27-Feb-04 7:40 
GeneralVisual Studio Setup and Framework version Pin
Shahin7727-Feb-04 6:17
Shahin7727-Feb-04 6:17 
GeneralRe: Visual Studio Setup and Framework version Pin
Heath Stewart27-Feb-04 6:34
protectorHeath Stewart27-Feb-04 6:34 
GeneralDisplay text in User Control of Child Form Pin
robeneal27-Feb-04 5:28
robeneal27-Feb-04 5:28 
GeneralRe: Display text in User Control of Child Form Pin
Heath Stewart27-Feb-04 5:48
protectorHeath Stewart27-Feb-04 5:48 
GeneralRe: Display text in User Control of Child Form Pin
robeneal27-Feb-04 6:01
robeneal27-Feb-04 6:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.