working on a virtual file system project with .net 8.0, I need to mount a drive and then create files and folders in the mounted drive.
I’m using DokanNet version 2.1.0 library to mount the drive but when I try to create a folder with code or manually in the mounted drive I get error: System.UnauthorizedAccessException: ‘Access to the path ‘E:testFolder’ is denied.’
How can I successfully create folders and files on the mounted drive
I have tried running my visual studio as an administrator but I still got the same error, I have also tried mounting in different location but got the same error.
Chizaram Obiakor is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
0
can you run the exe file that appears when you run it as debug or relase as an administrator and see if it creates a file? There is also a document showing how to check file permissions from the link below.
https://learn.microsoft.com/en-us/dotnet/api/system.io.directory.setaccesscontrol?view=netframework-4.8.1&redirectedfrom=MSDN#System_IO_Directory_SetAccessControl_System_String_System_Security_AccessControl_DirectorySecurity_