473,796 Members | 2,460 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Prevent users from reading application generated files

Hi Experts,
I am working on a windows application that generates few text
files and saves it onto the disk. Now I want that only my application
can read the files i.e. I don't want the user to open and read
application generated file from windows explorer. My main purpose is
that file should not be viewable to user.
Encryption of files is one way to achieve it but as it increases
overhead so I am less interested in this approach.
I am looking for some other approach like - Can I password protect/
lock my files so that only application can read it?
Please suggest some way to do this.
Thanks in advance
Dec 11 '07 #1
2 1360
On Mon, 10 Dec 2007 21:49:11 -0800, Mohit <mo*********@gm ail.comwrote:
Hi Experts,
I am working on a windows application that generates few text
files and saves it onto the disk. Now I want that only my application
can read the files i.e. I don't want the user to open and read
application generated file from windows explorer. My main purpose is
that file should not be viewable to user.
Encryption of files is one way to achieve it but as it increases
overhead so I am less interested in this approach.
Encryption is the only way. Depending on your needs, the encryption
doesn't necessarily need to be sophisticated.
I am looking for some other approach like - Can I password protect/
lock my files so that only application can read it?
There's no OS file system support for locking a user out of their own
data. You'll have to write the data to the file in some format that they
can't read.

It's not clear why your file shouldn't be readable by the user --
generally speaking, impeding the user from having full access to their own
data is not very nice -- but assuming you really need to do that, IMHO the
simplest approach would be to just run the output data through the
GzipStream class to compress it. A user could easily decompress the file
of course, if they figure out what the format is. But otherwise, the file
will be unreadable and you get the added advantage of much smaller file
sizes. In fact, it's likely that the i/o speed improvement dealing with
the smaller file will more than offset the additional overhead of
compressing and decompressing the data.

If that's not sufficient, you'll need a more elaborate encryption scheme.
There are cryptography classes in .NET that can help with that.

Pete
Dec 11 '07 #2
Thanks a lot Peter for your prompt reply!!
>It's not clear why your file shouldn't be readable by the user --
generally speaking, impeding the user from having full access to their own
data is not very nice
You are absolutely right. But I want to remove any possibility of
changing appl generated file by user.
I will probably go for some simple encryption scheme.

Thanks once again.
Dec 11 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
1603
by: JP SIngh | last post by:
Hi All We have an ASP application which links to various word and excel documents stored in a folder called attachments. The documents are extermely confidential in nature and we would like restrict the access to them through the application only. How can we prevent users from guessing the name of the document and reach it by tying http://myserver/attachments/thisdocument.doc
22
7583
by: alecjames1 | last post by:
I have a form which the user must complete before closing. I have disabled the window x button and use my own exit button. When selected it checks to see if the user has completed the entries otherwise it cancels the close. However, the user can still right click on the task bar and close my application. Is there any way of preventing this. Thanks Alex
8
4859
by: Smartin | last post by:
I have a form in Access97 which facilitates a query against a production Access database. Users will enter some search terms and see a datasheet view of the results in a subform. The prod table is linked (the form is not included in the production mdb file). I need to ensure that an unexperienced user will not accidentally change the prod table. What measures should I take? So far I have done the following: In the subform, set Allow...
7
2163
by: jsale | last post by:
I have made an ASP.NET web application that connects to SQL Server, reading and writing data using classes. I was recommended to use session objects to store the data per user, because each user using the application needs to see their own data only. My problem is that when multiple users are in the application, when in the session object, data is fine, however as there is only one instance of the class files, when data is put into them,...
18
3398
by: Gleep | last post by:
I've searched google intensely on this topic and it seems noone really knows how to approch this. The goal I don't want clients to give out their usernames and passwords to friends, since the site relies on subscrption fees. Sessions ID's are matched between the browser and the server. So a users can login with same username and password and those sessions are tracked individually. Some suggest create table fields with the session ID...
4
4886
by: Mark | last post by:
Can anyone tell me how i can prevent that users can see my connection string to mysql database? Using my browser i could easely use the function: view source.....showing the html/php code. IF the file includes the connection string than anyone could see my database name and password..... How can i prevent this??
1
2468
by: crka.crka | last post by:
Does anyone know a way to prevent a file being deleted so the only way to delete is via unistallation? Help would be very much appreciated.
3
3219
by: sajin | last post by:
Hi All, I am having a vb.net (VS 2005) application which creates some files in the Program Files foldes ( lets say 'Test') , but as usual when i uninstall this application i remove the folder from the Program Files but the thing is that if the user is bright enough and he did a copy paste to his personal before uninstalling , then he can use that file How can i prevent this , i got the idea of disabling the copy
3
1725
by: Robert Dunlop | last post by:
I am using Microsoft Visual Studio 2005 for development of an ASP.NET site, and I have a problem that greatly effects my workflow at times. It seems that after I upload new files anywhere within the directory structure of the site that is visible to VS, the next time I perform a build VS takes extra time, apparently downloading the new files (though the time required seems much longer than a one-time download should take). During this...
0
10457
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10231
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10176
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10013
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9054
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6792
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4119
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3733
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2927
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.