By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,492 Members | 1,242 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,492 IT Pros & Developers. It's quick & easy.

System.Security.Permissions.FileIOPermission in 2.0 Framework.

P: n/a
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:
System.Security.Permissions.FileIOPermission
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. :)

Cheers,

Cristian.

Jun 28 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Anyone at all? All assistance gratefully received.

Cristian.

Jul 11 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.