Hello
I'm using the File.Encrypt method (.net 2.0) to encrypt files and
folders (mark for encryption) on a local disk (XP SP2, 3DES, .net 2.0).
Unfortunatelly I get an exception when trying to mark the %desktop%
folder for encryption: "The process cannot access the file because it
is being used by another process).
Is there any possibility I can close handles that use the folder?
Thanks a lot in advance
Tom
Here's what I'm trying to do (snipped from msdn to keep focus on the
actual issue)
http://msdn2.microsoft.com/en-us/lib...e.encrypt.aspx
using System;
using System.IO;
using System.Security.AccessControl;
namespace FileSystemExample
{
class FileExample
{
public static void Main()
{
try
{
string FileName = @"C:\Documents and
Settings\USER1\Desktop";
AddEncryption(FileName);
}
catch (Exception e)
{ Console.WriteLine(e); }
}
public static void AddEncryption(string FileName)
{
File.Encrypt(FileName);
}
}
}