Access to the path is denied

as the title
i used file.ReadAllBytes this to get path.
there is antivirus,and have the admin right’s for this path.
who can help me? Pls

Hey @donghai,

Can you explain your problem a bit more using some artifacts for better understanding?

What are you trying to achieve here.


file.ReadAllBytes(“E:\aaa”).ToString

Hey @donghai,
can you try this?

File.ReadAllBytes(“complete FilePath with Filename”)

It’s OK.
I know the reason.

Thanks a million!

this is generally used to get the contents of the file in that path in bytes
to get the file path we need to use this instead buddy
Directory.GetFiles(path as string)
Cheers @donghai