Re: Question about FileDialog Permission

From: Humber Consumer (consumer62000_at_yahoo.com)
Date: 12/21/03

  • Next message: WJ: ".NET Framework Configuration Tool ?"
    Date: 20 Dec 2003 16:17:48 -0800
    
    

    thanks guys.
    I appreciate the help. I know that I can't rely on a dialog box to
    prevent file access. But I really wanted to prevent opening the dialog
    box. But now I know that there is a bug so I at least know that my
    understanding was right,

    By the way is there any place where you guys post all these known
    issues ( i know this is not a very critical error but...) so that
    people like me who are trying to learn and use .NET would refer to
    that list in case they suspect something wrong.

    thanks

    "Shel Blauman [MSFT]" <sheldonb@online.microsoft.com> wrote in message news:<OIGs$JyxDHA.560@TK2MSFTNGP11.phx.gbl>...
    > The primary problem was the demand for FileDialogPermission was only
    > occuring on the OpenFile Method of OpenFileDialog and SaveFileDialog. It's
    > actually working as documented, but not necessarily as one would expect. My
    > expectations would be for the dialog to not be displayed at all. However,
    > you shouldn't be depending on FileDialogPermission to protect files, you
    > should be depending on FileIOPermission. Here's a remark for
    > FileDialogPermission:
    >
    > "This permission is typically used to provide limited access to
    > user-specified files when FileIOPermission is not granted.".
    >
    > Based on the documentation the permission is working as intended.
    >
    > The bug that Ivan mentions would prevent the dialog from being displayed at
    > all, which is what one would intuitively expect. The soonest you could
    > expect to see that change would be the next release, but that's not
    > definite. That won't do you any good right now anyhow, so my suggestion is
    > to depend of FileIOPermission to protect files. I don't know of any way to
    > prevent the dialog itself from being displayed.
    >
    > Shel Blauman
    > --
    > This posting is provided "AS IS" with no warranties, and confers no rights.
    > Use of included script samples are subject to the terms specified at
    > http://www.microsoft.com/info/cpyright.htm
    >
    >
    > "Humber Consumer" <consumer62000@yahoo.com> wrote in message
    > news:5e1334d1.0312171656.7ac5251@posting.google.com...
    > > I have .NET 1.1 and still have same problem
    > >
    > > "Ivan Medvedev [MS]" <ivanmed@online.microsoft.com> wrote in message
    > news:<OIyh2pBxDHA.1396@TK2MSFTNGP10.phx.gbl>...
    > > > Humber -
    > > > there was a bug in the previous versions of the .NET Framework that
    > > > prevented the security check for FileDialogPermission in some cases.
    > This
    > > > bug has been identified and is now fixed.
    > > > --Ivan
    > > > http://blogs.dotnetthis.com/ivan
    > > > This message is provided "AS IS" with no warranties, and confers no
    > rights.
    > > >
    > > >
    > > > "Humber Consumer" <consumer62000@yahoo.com> wrote in message
    > > > news:5e1334d1.0312160918.7a764b49@posting.google.com...
    > > > > I have a doubt about the code groups and permissions .
    > > > >
    > > > > I created a C# windows app and inserted file open dialog.
    > > > >
    > > > > I open .NET config wizard and created a code groups CG1 underneath
    > > > > "Runtime Security Policy">User>COde Groups>All Code . I made the Hash
    > > > > as the membership criteria for this group and addded my app's hash (
    > > > > using import).
    > > > >
    > > > > I also created a Permission set where I gave all permissions except
    > > > > "File Dialog" . I assigned this permission set to the new code group
    > > > > that I created and also I made the code group exclusive by checking
    > > > > "this policy ..." check box ( first one) on the general tab of
    > > > > properties of code group.
    > > > >
    > > > >
    > > > > Now when I open my application,I was expecting to get a Security
    > > > > Permission Policy exception but I did not receive and error and
    > > > > application worked fine and was able to open the file open dialog box.
    > > > >
    > > > > AM I missing something here?
    > > > >
    > > > > I will appreciate help/


  • Next message: WJ: ".NET Framework Configuration Tool ?"

    Relevant Pages

    • Re: Cannot Open Outlook 2000 Files-Permission Error
      ... For all of the files (mailbox, archives, ... I got an error message: FILE ACCESS IS DENIED. ... > YOU DO NOT HAVE THE PERMISSION TO ACCESS THE FILE ...
      (microsoft.public.outlook.installation)
    • Re: Access UNC path from a network drive
      ... Normally Assemblies, like your program or any other .net assembly, get ... a FullTrust permission Set when its executed from any local drive ... executed from a network drive so your App would lack permissions to do ... file access and things like that. ...
      (microsoft.public.dotnet.languages.csharp)
    • Re: What errno value should I receive if trying to create a file an a read-only NFS volume
      ... Does a read-only file system imply that you don't have write permission to the directories residing on it? ... The rules for file access permissions are defined in XBD section 4.4. ... If the directory permission bit indicates it isn't writable the bad permission mode error should get returned. ...
      (comp.unix.programmer)
    • pst-File access is denied Office XP
      ... I am unable to import my personal file folder. ... "File access is denied. ... You do not have permission ... drive and reinstalled Office XP. ...
      (microsoft.public.outlook)

  • Quantcast