Hi all, I am very new to .NET, however I am finding coding in C# very enjoyable!
I have written a very basic windows app, that gets the user to browse for a folder, then creates folders and moves files based on filenames. This all works perfectly on my pc, I can even access folders across the network, however as soon as I take my .exe and put it on any other computer, I get FileIOPermissions exceptions from anything I do. Type: Demand, Zone: Intranet.
I've googled all day, and I've found heaps of people with my problem, but no solutions!
I have a few of these tiny apps to make, so ideally I would like to compile into a single .exe which I can put on any computer and run without problems. Can I get .NET to use basic windows user permissions instead of its annoyingly over complicated .NET stuff?
I have tried adding:
PermissionSet permSet = new PermissionSet(PermissionState.None);
permSet.AddPermission(new SecurityPermission(PermissionState.Unrestricted));
permSet.AddPermission(new FileIOPermission(PermissionState.Unrestricted));
but to no avail.
Any help would be greatly appreciated!
The program can be found here:
http://www.nomorepasting.com/getpaste.php?pasteid=1734&seen=true&langoverride=csharp