I have to write files to a hidden location in WPF.
I do not want the user to be able to locate these files.
When I'm done writing I plan to upload these files to a separate location.
What is the best location to write to for this scenario.
Thanks
This is not possible.
More experienced users will always be able to locate files you modify, using tools like Process Monitor.
If you don't want users to see the contents of the files, then encrypt them.
The best location to store application-specific data is %AppData%\YourApp\ (this is a per-user folder). You'll have write privileges to this folder even if the user isn't administrator.
If you try to save files to location where they need administrator privileges, you'll get User Account Control Dialog Box, and they will recognize that your application tries to access unauthorized location.
Related
I have a split database design in Microsoft Access. Copies of the front end (w/ forms, queries, linked tables) are distributed to multiple users, while the backend (tables only) resides on the network.
Everything works fine when there is only one user, but as soon as a second user tries to open their copy of the front end, they get an error message saying the backend is already in use.
I've already confirmed that everyone has read & write permissions for the backend.
I've used split databases before and never run into this issue. The only difference is this time I didn't use the Database Splitter utility. I just started with the backend, then created a new database and set up some linked tables. Could that be my problem? Is there a step or setting I'm missing?
In general, this should work.
However, not only do users need read/write, but they ALSO require create file, and delete file rights to that folder.
The reason is that of couse this is pure file based system, so on first open, Access will create a ldb (locking file). This locking file is used to manage (allow) multi-user operations of the file.
If the locking file can't be created (first user to open), then multi-user operations can't be used, and in fact in most cases you get a read-only file.
So, users need quite much full rights. I seen some work with delete rights, but that means the last user out does not allow access to remove (delete) that ldb locking file, and it should be allowed for deletion.
so, create file, delete file rights are also required in most cases for this to work.
It also possbile I suppose that one user launched Access, choose open, and browsed to that file, and opened it exclusive. However, you have a split system, and that should not be possible, but it certainly still possible that someone on the network opened the back end file (that shared file) directly with Access, and used the open exclusive option - which would prevent all other users from opening the file.
As noted, since this looks to be a split system, then I would suggest that users don't have the all important create file rights, and delete file rights to that folder. Without such rights, then as noted, multi-user operations can't occur - you get a read only file in most cases.
So, either users don't have enough rights to that folder, or someone has opened the file with Access, and opened the file "exclusive".
I'm working on a project and I need to dynamically check what is in onhe of my folder. The idea is that I have the id of a quest, and there is a folder name after that id. My code needs to check if this folder exist AND if there is something in it. After that, it show all the picture inside that folder. The goal is that I will just have to add picture in a folder to have them appear in my game.
I tried to find a way to check the content of my folder, but everyone say that I need flash.filesystem, BUT it means that I need to use AIR. AIR does NOT work in FireFox or any other browser.
Here is the website that make me understood that:
http://www.experts-exchange.com/Software/Photos_Graphics/Web_Graphics/Macromedia_Flash/Q_26118847.html
How can I explore the content of my folders then?
There is absolutely no way to explore the local file system without user interaction in Flash. If you want to do it, you must make an AIR application, which is not browser-based. This is a security feature that is imposed by each browser (you can't do it in JS either) and implemented identically by Adobe.
You can use FileReference to allow a user to select file(s) for Flash to have access to or save a file, but that is the most interaction with the filesystem that will be possible without opening AIR (which is also not limitless. Even with AIR, you won't have full access to the file system and will be locked out of certain directories and prevented from doing certain things)
If the folders are on your server you'll need to rely on a server side script to do the job and pass the result to your app.
If you mean folders on client side computer it's not gonna be possible for security reason.
I need to create a file in memory (without saving any copy of it in a filesystem) and then offer it to the user so that he/she can save it in his filesystem. How can I do this in Silverlight?
In Silverlight, access to files can be only user initiated.
This means, saving the file using a SaveFileDialog class.
Follow the link, there is an example there.
I have database in the MyApp.app/Contents/Resources folder. I want at least to read data from it in the sandboxed app.
Now I have a lot of "deny file-write-data /Users/user/Desktop/MyApp.app/Contents/Resources/DB/app_db.db" in the Console.
I can't use com.apple.security.temporary-exception.files.home-relative-path.read-write because I don't want to rely upon end user location of the app.
In spite of warnings in the Console my app is working. Is there any entitlement to give access or I should to copy my db to the container during first start?
Even reading from a db can require the DB to write to create locks etc., and you don't have a lot of control of that (you may have some depending on the db). Just follow your own intuition - copy the db on first run to your container.
Also file a radar, it can't harm.
Well, as everyone knows there is no way you can assign permissions for Copy/Paste of files on windows platform.
I need to control the copy process from a central file server, in a way that helps me know:
which user performed the copy
Which files were copied
where did he pasted them
Total size of data copied
Time of copy operation
If user exceeds the allowed "Copy-Limit", a dialog box requests him to enter administrative credentials or deny him (as it would be configured)
Store all this data in a file for later review or send by email.
I need to collect this data by putting a utility program on the server itself, without any other installation on client computers.
I know about monitoring the Clipboard, but which clipboard would it be? the user's clipboard or the server's clipboard ?
And what about drag-drop operation, which doesn't even pass through the clipboard?
Any knowledge of whether SystemFileWatcher is useful in such case ?
Any ideas ?
I don't think the clipboard has anything to do with things here. The result of a "Copy and Paste" action at the client is that files are copied from a share, right? In fact, it's not the act of "Copy" that you care about, it's the "Paste" (A clipboard Copy of a file doesn't do anything until you Paste it somewhere).
So, I think you should ignore clipboards all together and look for ways to monitor file access on your share.
Essentially, you're looking for file share auditing. Windows has some of this built in, but I'm no expert. In fact, you might get more traction with this sort of question on ServerFault.com (sister site to StackOverflow.com) so long as you word it in terms of file share auditing. Oh, and you didn't mention the OS of your server here - you should do so if you post on ServerFault.com.