Re: fileiopermission error

From: Nicole Calinoiu (calinoiu)
Date: 08/18/05


Date: Thu, 18 Aug 2005 09:06:20 -0400

Under default CAS (code access security) policy, applications run from the
internet or intranet are not granted permissions to the file system. There
are several ways around this:

1. Change the CAS policy on the client machines so that your assembly is
granted the FileIOPermission it needs. (See
http://blogs.msdn.com/shawnfa/archive/2003/06/20/57023.aspx and
http://blogs.msdn.com/shawnfa/archive/2003/06/26/57026.aspx for details.)

2. Use isolated storage instead, limited subsets of which are permitted
under default policy for code running from these zones.

3. If you're running from the intranet zone, use SaveFileDialog to write
the file. This requires only FileDialogPermission\Save, which is included
in the default intranet zone grant (but not the default internet zone
grant).

"ahmed khairy" <ahmedkhairy@discussions.microsoft.com> wrote in message
news:EEFE68B9-26C9-4ED3-8C75-89DCCDF269FA@microsoft.com...
>I recently developed a web based application however each time i run it
>frmo
> my web browser and attempt to write a file to my local machine i get the
> errror:
> "Request for the permission of type
> 'System.security.permissions.FileIOPermission, mscorlib, Version =
> 2.0.0.0...................failed'"
> many thanks...



Relevant Pages

  • Re: Locked down security policy cannot call web service
    ... No mapped drives. ... eliminate the Intranet rights from the policy (never ... Still if the policy is ...
    (microsoft.public.dotnet.security)
  • Re: Microsoft has not verified that this....
    ... > I dont think I have a proxy. ... want to ensure that IE knows what Internet domains are intranet domains. ... I select Intranet and then click sites button. ... IE should say that you are in the local intranet zone and then ...
    (microsoft.public.sharepoint.portalserver)
  • Re: windows authentication - iis 6.0
    ... The Intranet or Trusted Sites are set in policy and the user is blocked from ... I do have Integrated Windows Authentication set up. ...
    (microsoft.public.windows.server.general)
  • Internet Explorer maintenance policy not applied
    ... I have a GPO managing my Windows 2003 Server Terminal Server NLB cluster ... that's where the policy is linked. ... the correct sites into the intranet zone. ...
    (microsoft.public.win2000.group_policy)
  • Internet Explorer maintenance policy not applied
    ... I have a GPO managing my Windows 2003 Server Terminal Server NLB cluster ... that's where the policy is linked. ... the correct sites into the intranet zone. ...
    (microsoft.public.windows.group_policy)

Loading