Access to the path 'C:\Users\xxx\Desktop' is denied

后端 未结 5 440
-上瘾入骨i
-上瘾入骨i 2021-01-07 16:42

I have thoroughly searched the entire access denied questions and did\'t find any question related to access to windows form on my own system all the questions are related t

5条回答
  •  礼貌的吻别
    2021-01-07 17:30

    I found that a file's read only flag (when set on) will prevent FileStream and MemoryMappedFile objects from opening and reading the file. There are two solutions: Untick the read only or change the FileStream/MemoryMappedFile to open in FileMode.Read/MemoryMappedFileAccess.Read; the default read/write behavior for a FileStream is Read/Write.

提交回复
热议问题