Re: FileIOException, Need help please
From: Dominick Baier [DevelopMentor] (dbaier_at_pleasepleasenospamdevelop.com)
Date: Sat, 14 May 2005 00:56:39 -0700
Hello Nicole Calinoiu" calinoiu REMOVETHIS AT gmail DOT com,
i would also suggest to not use the filename that is returned from the fileopen
dialog but the FileStream..does not require that much permissions...
Dominick Baier - DevelopMentor
> "Moe" <Moe@discussions.microsoft.com> wrote in message
>> I have a winForm control that contains an openFileDialog.
>> I am using this control in a webForm by enbedding it using an
>> I need to access some information about the file on the client.
>> I strongly named my control assembly .
>> I created a machine level permission set, and assigned FileDialog,
>> and User interface permission.
>> I created a code group under all_Code, associated my assembly's
>> to that group and assigned the permission set i created previously.
> Not a great idea. It would be better to add the new group under the
> appropriate zone group (usually intranet) in order to minimize the
> potential impact of a compromise of your signing key.
>> I also added the following attributes to my assembly:
>> [assembly: FileDialogPermission(SecurityAction.RequestMinimum,
>> = true)]
>> [assembly: UIPermission(SecurityAction.RequestMinimum, Unrestricted =
>> [assembly: FileIOPermission(SecurityAction.RequestMinimum,
>> Unrestricted =
>> I am having a file IO Exception while trying to retreive the FileName
>> property of the openFileDialog.
> It really shouldn't be getting that far. Given that you've specified
> RequestMinimum for
> unrestricted FileIOPermission, your assembly should not run at all if
> permission is denied. Are you sure that you're attempting to run the
> version of the assembly?
> That said, you'll still have a problem once you resolve the above
> issue since the IE host won't resolve your assembly's strong name
> until after the permissions grant is complete. For workarounds, see
>> Any help will be very appreciate it.