473,387 Members | 1,504 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.

FileIOPermission issue

Hi all,

I have this code sample

FileIOPermission fp = new FileIOPermission(PermissionState.Unrestricted);

fp.Deny();

StreamWriter sw = new StreamWriter(@"c:\test.txt");

sw.Write("Test");

sw.Close();

I do not understand why the file is still created?
Jul 21 '05 #1
0 1338

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

Similar topics

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.] ...
0
by: John Delange | last post by:
Hello, I wrote a .NET Windows.Forms User Control that needs to be runned through Internet Explorer, like in this article: http://www.15seconds.com/issue/030610.htm. This control needs to 1.) Run...
0
by: Mircea Pleteriu | last post by:
Hi all, I have this code sample FileIOPermission fp = new FileIOPermission(PermissionState.Unrestricted); fp.Deny(); StreamWriter sw = new StreamWriter(@"c:\test.txt");
4
by: brian | last post by:
Hello I get this error when trying to create a file: Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission,...
6
by: schaf | last post by:
Hi NG ! I have the following piece of code below. the first try/catch part would return true although I do not have permission to access this computer. The second try/catch part would return...
1
by: jmurphy95 | last post by:
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...
10
by: Emil | last post by:
When I compile the application and run it (on my computer) it works fine, by on the other computers exception is thrown: "Request for the permission of type...
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...
1
by: innes | last post by:
Hi, I'm trying to test permission to access the file system, using FileIOPermission, but can't seem to get it to work. See my sample app below, for an app that tries to demand a permission to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
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.