473,387 Members | 1,834 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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:
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
1 2648
Anyone at all? All assistance gratefully received.

Cristian.

Jul 11 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Olaf Baeyens | last post by:
Can someone out there point me to a URL or other reference how to use these security stuff in .NET? I know everything can be found online on the msdn but since I am new to this security stuff, I...
3
by: nick | last post by:
The program runs well on Local harddisk. But it always popup the exception if I run it on Netware mapping disk. After debugger say there is no source code on the exception. Also the following error...
0
by: Namratha Shah \(Nasha\) | last post by:
Hey Guys, Today we are going to look at Code Access Security. Code access security is a feature of .NET that manages code depending on its trust level. If the CLS trusts the code enough to...
0
by: paul | last post by:
I just installed Windows XP SP2 on my web server. Now when I run one of the web applications I get the following error: ArgumentException: Illegal characters in path.] ...
3
by: Juhan | last post by:
Hi! I have a strange error in a console application that is hosted by IIS 5.0 and invokes a web service hosted on the same machine. A request form the web comes in and it is dispatched to a...
3
by: Carl | last post by:
Hi. I have my program written as a console application in C# .NET 2005. I run it from a server on the local intranet and I got this message: An unhandled exception of type...
1
by: Usman Ghani | last post by:
Hi, I am trying to develop an activex control with the .Net by exposing an interface to the com as described in the following article....
3
by: Mike | last post by:
Hi I have problem as folow: Caught Exception: System.Configuration.ConfigurationErrorsException: An error occurred loading a configuration file: Request for the permission of type...
4
by: confused1234 | last post by:
I get the error at the bottom of this post when i click on a linkbutton, javascript:__doPostBack('ctl00$Main$btnchangeemail','') The problem is intermitant, sometimes it works and sometimes...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.