Re: FileIOException, Need help please

From: Nicole Calinoiu (calinoiu)
Date: 05/14/05


Date: Sat, 14 May 2005 08:04:03 -0400

That would only work if the goal is to open the file for reading, which
doesn't sound like the case here ("access some information about the file on
the client" from OP). My guess is that it's probably more likely that
FileDialogPermission can be dispensed with in this particular case rather
than FileIOPermission. However, the assembly may also contain other
functionality, so permissions that appear superfluous to us may actually be
required by other code...

"Dominick Baier [DevelopMentor]" <dbaier@pleasepleasenospamdevelop.com>
wrote in message news:380598632516613983471072@news.microsoft.com...
> 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
> http://www.leastprivilege.com
>
>> "Moe" <Moe@discussions.microsoft.com> wrote in message
>> news:3E8B6871-4DF4-4ABE-8E0F-065B7DC14CD7@microsoft.com...
>>
>>> I have a winForm control that contains an openFileDialog.
>>> I am using this control in a webForm by enbedding it using an
>>> <object>
>>> tag.
>>> 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,
>>> FileIO
>>> and User interface permission.
>>> I created a code group under all_Code, associated my assembly's
>>> strong
>>> name
>>> 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:AllowPartiallyTrustedCallers]
>>> [assembly: FileDialogPermission(SecurityAction.RequestMinimum,
>>> Unrestricted
>>> = true)]
>>> [assembly: UIPermission(SecurityAction.RequestMinimum, Unrestricted =
>>> true)]
>>> [assembly: FileIOPermission(SecurityAction.RequestMinimum,
>>> Unrestricted =
>>> true)]
>>> 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
>> a
>> RequestMinimum for
>> unrestricted FileIOPermission, your assembly should not run at all if
>> this
>> permission is denied. Are you sure that you're attempting to run the
>> latest
>> 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
>> http://blogs.msdn.com/shawnfa/archive/2003/06/26/57026.aspx.
>>
>>> Any help will be very appreciate it.
>>>
>>> Thanks!
>>>
>
>
>



Relevant Pages

  • RE: Error binding to local domain
    ... away because I was away for a couple weeks and I do not force permissions on ... The permissions dialog just times out trying to resolve the ... >> following event "Windows cannot query for the list of Group Policy objects. ... >> An Active Directory, network connectivity, or network configuration problem ...
    (microsoft.public.windows.server.sbs)
  • RE: 401.3 Unauthorized: Unauthorized due to ACL on resource
    ... > Thank you for posting in SBS newsgroup. ... > To resolve this issue, ... > permissions from parent to propagate to this object check box. ... you may want to contact Microsoft CSS directly. ...
    (microsoft.public.windows.server.sbs)
  • RE: Since SP1 install auto backup failing
    ... > permissions are changed in Windows Server 2003 SP1. ... > Before you follow the steps in this section that describe how to resolve ... > registry and then restarting the DCOM process that you want to examine. ... > error information in the newsgroup. ...
    (microsoft.public.windows.server.sbs)
  • RE: RWW Login Loop
    ... Since the KB 886206 does not resolve your issue, ... Install the update 821156 and check if the issue is resolved: ... Check the permissions on C:\inetpub\Remote folder. ... the ''Web sharing'' should be enabled on this folder. ...
    (microsoft.public.windows.server.sbs)
  • Re: NTFS Permissions wont resolve
    ... no groups or users will resolve... ... > from one domain and joined to another, non-trusting domain, in which case ... > Eric Fitzgerald ... >>> I am trying to view the NTFS permissions on one of our file servers. ...
    (microsoft.public.win2000.security)