FileIOPermissions issue - howto fix?

Shmulik28_at_yahoo.com
Date: 07/19/03


Date: Sat, 19 Jul 2003 14:17:47 -0400


My application uses components and controls contained in a control library
which works fine on my home system. When I installed the application on our
local network a twork, one of the controls (A logging window with a
richtextbox
control and edit/save capabilities) disappears from the main form. When I
drag the "LogWindow" control from the toolbox and drop it on my form I
receive the following error message:

 "...The exception was "Request for the permission of type
System.Security.Permissions.FileIOPermission, mscorlib, Version=1.0.5000.0,
..., failed.";

Trying to debug this it appears that the culprit is the SaveFileDialog
component (if I comment out the code associated with this component in the
library, I can drop a "LogWindow" onto my form.

I check permissions on the drive and either as myself, or logged-in as
administrator, have
full access to the drive.

What I find perplexing is that I can drop and use a SaveFileDialog control
directly on my form, but if it is contained with a control in a library I
cannot.

In order to temporarily fix this, I used the Security Adjustent Wizard and
set the trust level to "Full Trust" for the Local Intranet, but I only want
to do this until I can understand how to do it right.

My questions are:

1) What application/assembly needs a trust level "boost" in order to drop a
control from a control library onto a form in VS2003 in design mode? Do I
need to do something with the mscorlib assembly? Or is there some attribute
I need to tag the user control library with in order to work in design mode
(I can understand that maybe the program wouldn't run without proper
permissions, but why can't I design the application?)

2) If I created a "group" with all the necessary privileges, how does my
program "execute" as under the elevated permissions, while allowing the user
to run other applications under their normal permissions - an example would
be helpful.

Thanks!



Relevant Pages

  • GPO to Solve this Issue
    ... problems but in this case the permissions are set up so that Everyone has ... full control on the share permissions and the NTFS permissions are set so ... Can anyone shed any light on the ACTUAL workings of the home folder mapping ...
    (microsoft.public.windows.server.active_directory)
  • GPO for Resolution
    ... problems but in this case the permissions are set up so that Everyone has ... full control on the share permissions and the NTFS permissions are set so ... Can anyone shed any light on the ACTUAL workings of the home folder mapping ...
    (microsoft.public.windows.server.active_directory)
  • Consider Windows XP File Security and Group Policies
    ... If you are running Windows XP and are using the NTFS file system, ... Account from being able to purge its history footprint files. ... Changing Folder permissions to Read-Execute instead of Full ... you globally apply Full Control for the Administrators group and the SYSTEM ...
    (microsoft.public.windowsxp.general)
  • Re: Access denied message even with the Administrator user
    ... I set all to Full Control and still keep getting the Access ... The Share Permissions setting is: ... > This newsgroup only focuses on SBS technical issues. ... you may want to contact Microsoft CSS directly. ...
    (microsoft.public.windows.server.sbs)
  • Re: File Permissions
    ... The default full control for everyone on the root folder is a security issue ... back to default ntfs permissions. ... particularly for the administrator account, ...
    (microsoft.public.win2000.security)