473,396 Members | 1,784 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to open a text file only through my application but not others?

In my case, I have a file placed on a file server,
I can set the permission about the folder/file.

How can I let the user can read the file in the application I create
but they cannot direct access the file out of my application?

Aug 23 '06 #1
6 974
Cylix,

A windowform or a webapplication?

Cor

"Cylix" <cy*******@gmail.comschreef in bericht
news:11*********************@m73g2000cwd.googlegro ups.com...
In my case, I have a file placed on a file server,
I can set the permission about the folder/file.

How can I let the user can read the file in the application I create
but they cannot direct access the file out of my application?

Aug 23 '06 #2
VB.NET application

Cor Ligthert [MVP] wrote:
Cylix,

A windowform or a webapplication?

Cor

"Cylix" <cy*******@gmail.comschreef in bericht
news:11*********************@m73g2000cwd.googlegro ups.com...
In my case, I have a file placed on a file server,
I can set the permission about the folder/file.

How can I let the user can read the file in the application I create
but they cannot direct access the file out of my application?
Aug 23 '06 #3
Cylix,

Is it possible that you did not close the writing, as well is there an extra
command for this.
http://msdn2.microsoft.com/en-us/lib...ter.flush.aspx

I hope this helps,

Cor
"Cylix" <cy*******@gmail.comschreef in bericht
news:11**********************@p79g2000cwp.googlegr oups.com...
VB.NET application

Cor Ligthert [MVP] wrote:
>Cylix,

A windowform or a webapplication?

Cor

"Cylix" <cy*******@gmail.comschreef in bericht
news:11*********************@m73g2000cwd.googlegr oups.com...
In my case, I have a file placed on a file server,
I can set the permission about the folder/file.

How can I let the user can read the file in the application I create
but they cannot direct access the file out of my application?

Aug 23 '06 #4
Thanks cor,
actually, I am going to open some binary files like doc, pdf.

Aug 23 '06 #5
On 22 Aug 2006 18:20:43 -0700, "Cylix" <cy*******@gmail.comwrote:

¤ In my case, I have a file placed on a file server,
¤ I can set the permission about the folder/file.
¤
¤ How can I let the user can read the file in the application I create
¤ but they cannot direct access the file out of my application?

See the "Impersonate a Specific User in Code" section located in the following article:

http://support.microsoft.com/kb/306158/
Paul
~~~~
Microsoft MVP (Visual Basic)
Aug 23 '06 #6
Cylix wrote:
In my case, I have a file placed on a file server,
I can set the permission about the folder/file.

How can I let the user can read the file in the application I create
but they cannot direct access the file out of my application?
If you don't want to use access this file as another user from your
program, you could concider crypting the contents. So when the user does
open the file it's rather useless.
--
Rinze van Huizen
C-Services Holland b.v
Aug 24 '06 #7

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

Similar topics

5
by: gwarning! | last post by:
Goal: Have multiple text files, each of various lengths, be concatenated together into one final consolidated text file. Problem: Since the names of the files to be concatenated can change from...
2
by: Michael Thomas | last post by:
Hi everyone Do any of you know if this is possible in Access either by using the import tool or by writing a module in VB: I have a database containing information for a retail chain which,...
3
by: RN Das | last post by:
Hi expert, I have a small web application in C# and ASP.Net and I want to open a file in notepad when clicked on a linked button. Here is hander code when clicked on the link button. It can open...
1
by: jcrouse | last post by:
This is sort of a revisited item from about two months ago (don't get mad Cor) with additional code. I am creating a batch file called CreateMameGames.bat. I am then running that batch file to...
6
by: Moumen VB.NET 2003/2005 Developer | last post by:
How can I detect if a file sitting on a network drive is still open by another application? This application resides on another machine on the network? I am using VB.NET 2003 Your help is...
2
by: RdS | last post by:
Hello, I use sourcesafe and vb 2003 for my dev environment. on the sourcesafe server I also have sql2005 and reporting services installed. The web app references this sql server for db. When...
8
by: someone | last post by:
I'm making an program that encodes text, and then writes it into another text file. The problem is that I can't seem to get the "file exists" checking right. If I use the command (coder is the...
3
by: Mark.V.Sullivan | last post by:
I have encountered the same problem another posted about several months ago. Unfortunately, there was no result posted on the old thread. I will let the original message text stand and ask if...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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...
0
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...

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.