SecurityException when use DirectoryInfo???
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.