permissionset

Why does my .NET application crash when run from a network drive?

My .NET application fails when run from a network drive even when the very same executable runs perfectly fine from a local hard drive? I tried checking for "Full trust" like so: try { // Demand full trust permissions PermissionSet fullTrust = new PermissionSet( PermissionState.Unrestricted ); fullTrust.Demand(); // Pe...

.NET Publisher Certificates

I'm using a book for studying for .NET certification, and I'm stumped on the issue of publisher certificates. Background: Windows Vista Home Basic SP2 Visual Studio 2008 .NET 3.5 SP1 Goal: Write a simple C# console application that has its permission to read from a specific text file determined by the application's certificate. Symp...

Executing untrusted code

Hi, I'm building a C# application which uses plug-ins. The application must guarantee to the user that plug-ins will not do whatever they want on the user machine, and will have less privileges that the application itself (for example, the application can access its own log files, whereas plug-ins cannot). I considered three alternativ...

What is the purpose of the PermissionSet attribute in the MSDN FileSystemWatcher class example?

On the MSDN FileSystemWatcher Class page, it includes an example with the following class attribute: [PermissionSet(SecurityAction.Demand, Name="FullTrust")] What is the purpose of this? When should it be included or not included? The FileSystemWatcher Class help page is here: http://msdn.microsoft.com/en-us/library/system.io.file...