Re: fileiopermission error
From: Nicole Calinoiu (calinoiu)
Date: 08/18/05
- Next message: Nikolai Evseev: "Re: Can't determine if a file exists"
- Previous message: chjossi_at_gmx.ch: "Does preJIT protect the assemblies?"
- In reply to: ahmed khairy: "fileiopermission error"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
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...
- Next message: Nikolai Evseev: "Re: Can't determine if a file exists"
- Previous message: chjossi_at_gmx.ch: "Does preJIT protect the assemblies?"
- In reply to: ahmed khairy: "fileiopermission error"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|