For Programmers: Free Programming Magazines  


Home > Archive > C# > January 2006 > SecurityException when application moved to network folder









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author SecurityException when application moved to network folder
parry

2006-01-10, 4:10 am

Hi Everyone:

I have asimple app as below

using System;

using System.IO;

using System.Security;



class App{

public static void Main(string[] args){

StreamReader reader = new StreamReader(args[0]);

Console.WriteLine(reader.ReadToEnd());

}

}

I complie this app and call like C:\DSTest>DisplayFile
C:\DSTest\Test.txt and it wok fine.

When i move this app to network and call like

y:\DisplayFile C:\DSTest\Test.txt

i got an error but when i moved th file to same directory then it work
like

y:DSTest\\DisplayFile Y:\DSTest\Test.txt

Please help.Thanks in advance.

Parry

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com