FileInfo encrypt() method

ahmad_hamdan

Member
Joined
May 24, 2010
Messages
19
Programming Experience
Beginner
Hi all,

I am trying to use FileInfo.encrypt but i get an exception saying " The request isnot supported", i looked in the msdn but nothing related to that is there, when i check the exception type is System.IOException

Can any one help me with it

Here is my Code:
VB.NET:
Dim fi As New FileInfo("D:\act.txt")
        Try
            fi.Encrypt()
            Console.Read()
            fi.Decrypt()
        Catch ex As IOException
            MsgBox(ex.Message)         
        End Try
 
Maybe your Windows version or the hard drive itself, for some reason, does not support encryption. Code works fine for me, and I get a notification message from Windows reminding me to backup my encryption key.
 
I have a window 7 Home premuim, and the Hard Drive is of type NTFS. I thought about the encryption issue but didn't know what to do with it.
Thanks for your help
 
Where as I have Windows 7 Professional. Maybe it is one of those "special things" that only Professional and Ultimate versions of Windows 7 have?? Same goes for Vista.
 
Back
Top