473,397 Members | 2,028 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,397 software developers and data experts.

file.io.permission error when source on network drive IDE setup?

cig
Using VS.Net 2K3 Pro.

My development environment is set up with project & source files on a
network drive and until a recent server hardware failure followed by a
restore/rebuild this worked very well. I now find that the code blows up with
the FileIoPermission error when I try to run either the project in
debug/release mode from the IDE or the built exe from the network drive.

The first time I tried to run a project setup like this the IDE threw up a
dialogue box to force confirmation that this was the way I wanted to work.

The question is how do I reset the IDE and or server security settings (I
have full ownership of all files in question on the server) to allow me to
continue working this way? Creating/running a new project on/from the
network drive doesn't do the trick.

I also tried 'demanding' permission, as per the noddy code below, but no joy.

try
{
// We get past this quite nicely thank you...
FileIOPermission fIoP = new
FileIOPermission(FileIOPermissionAccess.Write, Environment.CurrentDirectory);
fIoP.Demand();
Console.WriteLine("We have permission?");

// ... but it dies the death here.
FileStream fs = new FileStream("fred.txt", FileMode.Open);
Console.WriteLine("Yes.");
Console.Read();

fs.Close();
}
catch(System.Exception ex)
{
Console.WriteLine("{0}", ex.Message);
Console.Read();
}
Nov 16 '05 #1
0 1156

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

Similar topics

6
by: paul calvert | last post by:
I hope somewhere here has encountered and solved a similar problem in the past. 1) on a new Win2000 PC: installed Visual C++ 6.0 download & install single file Service Pack 5.0 2) try to...
0
by: cigwork | last post by:
Using VS.NET 2K3 pro. My development environment is set up with project & source files on a network drive and until a recent server hardware failure followed by a restore/rebuild this worked...
5
by: helpful sql | last post by:
Hi all, I dynamically generate Word Documents from my web application using XmlDocument object and need to save them on a mapped network drive. I use the Save method of XmlDocument object to save...
3
by: MLH | last post by:
I'm developing an app that I'd like to backup each time I open it for modifications. Is it too late to do so after opening the file with Access? Here's what I've been trying... Trevor Best posted...
8
by: Lam | last post by:
HI anyone knows how can I open a mapped network file in C#? I try string file = @"T:\file.txt"; it shows me the error: "Could not find a part of the path" but if I copy the file to my C dirve,...
1
by: TaeHo Yoo | last post by:
The file I would like to access in located in C drive and the application which reads the file is located in E drive. When it trys to read the file, it generates an error Error: Request for the...
11
by: sur | last post by:
Hello, My problem is that File.Exists works fine if my file is on my local drive but returns false if its on any other drive. I think that the issue is probably file permissions and so I have...
1
by: JeffW | last post by:
Researched this, but none of the proposed solutions are working for me. Am hoping for some insight. Am trying to open a binary file that exists on a shared drive for reading. Code lives inside...
8
by: Sarah | last post by:
I need to access some data on a server. I can access it directly using UNC (i.e. \\ComputerName\ShareName\Path\FileName) or using a mapped network drive resource (S:\Path\FileName). Here is my...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.