IDE / Server file permission problem?
From: cigwork (cigwork_at_discussions.microsoft.com)
Date: 10/27/04
- Next message: Nishith Pathak: "Re: Renaming a file"
- Previous message: Nishith Pathak: "RE: session time out"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 27 Oct 2004 02:25:02 -0700
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 apps blows up with the
FileIoPermission error when I try to run the app in either debug/release mode
from the IDE or as a built .exe on 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 is the way I wanted to work.
The question is how do I reset the IDE, server security settings and or
public/private key used to allow me to continue working this way? I already
have full control over the files in question.
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();
}
- Next message: Nishith Pathak: "Re: Renaming a file"
- Previous message: Nishith Pathak: "RE: session time out"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|