Re: Question about FileDialog Permission
From: Humber Consumer (consumer62000_at_yahoo.com)
Date: 12/21/03
- Previous message: Shel Blauman [MSFT]: "Re: Question about FileDialog Permission"
- In reply to: Shel Blauman [MSFT]: "Re: Question about FileDialog Permission"
- Next in thread: Shel Blauman [MSFT]: "Re: Question about FileDialog Permission"
- Reply: Shel Blauman [MSFT]: "Re: Question about FileDialog Permission"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
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/
- Previous message: Shel Blauman [MSFT]: "Re: Question about FileDialog Permission"
- In reply to: Shel Blauman [MSFT]: "Re: Question about FileDialog Permission"
- Next in thread: Shel Blauman [MSFT]: "Re: Question about FileDialog Permission"
- Reply: Shel Blauman [MSFT]: "Re: Question about FileDialog Permission"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|