3
Reply

SecurityException when use DirectoryInfo???

thomas_fogh

thomas_fogh

Mar 8 2005 6:06 AM
4.5k
I get the following exception when run the code below. Why is that? CODE: DirectoryInfo dirInfo = new DirectoryInfo("D:\test"); EXCEPTION: An unhandled exception of type 'System.Security.SecurityException' occurred in mscorlib.dll Additional information: Request for the permission of type System.Security.Permissions.FileIOPermission, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.

Answers (3)