I am trying to read a binary file and I'm having errors on 64-bit systems, where it seems That is to be open with file writing privileges and thus placed in a secure folder error (program files in 64 bit window) I can duplicate this error on my system (XP, 32 bit) to read the document only Read docs Programmed setting.
Here's the code I am using:
Also consider?
Instead of the appadata folder?
This can help to know the exact exception being thrown away. When a readable file is opened for writing, then unauthorized access is used while accessing security Execution is run in an app domain, which does not have permission to open that file in specified mode. It will be the same if you are actually trying to write in a read-only file , While the other might be if the user or the code also can not read it.
In addition, try to specify a fileshare value of only one shot dark, read, which will allow other threads / processes to read the file too. The default is no one, which lockes all other access to the file and if Windows thinks that a full lock is somehow similar for writing logging, then problems may arise.
Comments
Post a Comment