Copying a file from a server to a client

  • Thread starter Thread starter kwydra
  • Start date Start date
K

kwydra

I'm pretty new to the .net framework so hopefully this
question will be easy.

I need to create a document management style
client/server application that provides the following
functionality:

There is a secure file structure on a network that end-
users do not have direct access to. I need to create a
solution where there is some type of server based
component that has rights to the file structure and can
copy the file to a requesting client application that
subsequently writes the contents of the file to a
temporary directory and then opens the document with the
appropriate helper application. User security will be
handled from within the server-based component. What
classes of the .NET framework should I use to transfer
the contents of the file to the local client and write
the file back to a local directory.

If anyone knows of any similar samples out there please
fill me in.

Thanks in advance!
 
kwydra,

I would use a class derived from ServicedComponent to do this. The
reason for this is that you can set up the component to run as a different
user. You would set this user to one that has access to the share.

I think that the easiest way to do this would be to have the remote
component move the file to a well known share, returning the name of the
file that the client wants. Then the client would copy the file locally and
launch the app. The client would also be responsible for deleting the file
on the share.

Hope this helps.
 
Back
Top