From: Eric Phetteplace (ericp_at_nextivr.com)
Date: Fri, 11 Jun 2004 21:59:01 -0400
Thanks for your help!
I tried adding an IPermission element for FileIOPermission, right under the
existing one in the wss_mediumtrust.config:
When I try to read g:\specialdir\test.txt, I receive the following error:
The HelloWorldApp, Version=188.8.131.52, Culture=neutral,
PublicKeyToken=dc2757a2b56c5017 assembly specified in a Register directive
of this page could not be found
"Keith Brown" <Keith Brown@discussions.microsoft.com> wrote in message
> Hey Eric,
> You definitely do NOT want to make the SecurityPermission unrestricted.
That has no effect at all on the FileIOPermission, which is what you really
want to fix, but what it does do is grant all *sorts* of scary permissions
(like ControlPolicy, which allows you to set
SecurityManager.SecurityEnabled=false and turn off all of CAS!)
> You have a couple of choices: you can either move your functionality into
an assembly in the GAC (where it will be fully trusted) and mark your
assembly with the AllowPartiallyTrustedCallers attribute, or you can change
policy like you were suggesting by adding an element for FileIOPermission,
either making it unrestricted or (even better) specifying the exact
directory and permission level you need to grant.
> Keith Brown, MVP