Home All Groups Group Topic Archive Search About

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

Author
23 Aug 2006 1:20 AM
Cylix
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?

Author
23 Aug 2006 5:23 AM
Cor Ligthert [MVP]
Cylix,

A windowform or a webapplication?

Cor

Show quoteHide quote
"Cylix" <cylix2***@gmail.com> schreef in bericht
news:1156296043.560646.61430@m73g2000cwd.googlegroups.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?
>
Author
23 Aug 2006 8:01 AM
Cylix
VB.NET application

Cor Ligthert [MVP] wrote:
Show quoteHide quote
> Cylix,
>
> A windowform or a webapplication?
>
> Cor
>
> "Cylix" <cylix2***@gmail.com> schreef in bericht
> news:1156296043.560646.61430@m73g2000cwd.googlegroups.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?
> >
Author
23 Aug 2006 8:30 AM
Cor Ligthert [MVP]
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/library/system.io.streamwriter.flush.aspx

I hope this helps,

Cor


Show quoteHide quote
"Cylix" <cylix2***@gmail.com> schreef in bericht
news:1156320108.165858.135020@p79g2000cwp.googlegroups.com...
> VB.NET application
>
> Cor Ligthert [MVP] wrote:
>> Cylix,
>>
>> A windowform or a webapplication?
>>
>> Cor
>>
>> "Cylix" <cylix2***@gmail.com> schreef in bericht
>> news:1156296043.560646.61430@m73g2000cwd.googlegroups.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?
>> >
>
Author
23 Aug 2006 9:58 AM
Cylix
Thanks cor,
actually, I am going to open some binary files like doc, pdf.
Author
23 Aug 2006 1:13 PM
Paul Clement
On 22 Aug 2006 18:20:43 -0700, "Cylix" <cylix2***@gmail.com> 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?

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)
Author
24 Aug 2006 2:52 PM
C-Services Holland b.v.
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