467,921 Members | 1,336 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,921 developers. It's quick & easy.

System.Security.Permissions.FileIOPermission in 2.0 Framework.

Hi there,

I have a Windows application that I'm running from a shared drive that
needs to access file/directory resources on other drives. I've done a
lot of reading, but a lot of the material out there relates to the 1.1
Framework as opposed to 2.0.

I've added the following lines to my AssemblyInfo.vb:
<Assembly: System.Security.AllowPartiallyTrustedCallers()>
<Assembly: System.Security.SecurityTreatAsSafe()>
<Assembly: AssemblyKeyFile("fish.snk")>

I've enabled ClickOnce Security settings to be full trust, although
that is not how I deploy the application (it's a one file Windows app,
so I just xcopy).

I've signed the assembly from within the IDE, using the name referenced
in the AssemblyInfo file.

I've evaluated the assembly using the .Net 2.0 Framework Configuration
tool: all levels, unrestricted.

I even installed the .Net Framework SDK on the machine on which the
code sits and created a new Code Group at the Enterprise level. The
membership condition is the imported Strong Name from my assembly, and
I've also selected "The policy level will only have permissions from
permission set associated with this code group." and "Policy levels
below this level will not be evaluated." I assigned this code group
the "Full Trust" permission set.

My code attempts to read a text file from a non local directory and is
called from a shared drive. I get this error message:

The action that failed was: Demand
The type of the first permission that failed was:
The Zone of the assembly that failed was: Intranet

I'm really struggling with this problem which I'm sure is really
simple. I'm hoping someone can lend me a hand because I must have
missed something pretty elementary to still be having an issue. Any
help will be much appreciated. :)



Jun 28 '06 #1
  • viewed: 2337
1 Reply
Anyone at all? All assistance gratefully received.


Jul 11 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Olaf Baeyens | last post: by
reply views Thread by paul | last post: by
3 posts views Thread by Carl | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.