By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,032 Members | 1,175 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,032 IT Pros & Developers. It's quick & easy.

Copying files across network

P: n/a
Sue
Hello

We have an application where the user would upload files (max size of
200 mb) from their client machine. This application will run on a web
server (its a web server which would be used by the general public),
because of obvious reason, this server will not have access to any
shared directory on the network.

Currently we store the file on the local drive (c:) of that server and
an other application running on an internal server will move that file
to the network. I'm looking for a better way to have the files streamed
across the network. I have the file content stored as a byte array.

Could someone please show me examples of how to do it.

Thanks in advance
Sue..

Feb 7 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Sue,

Are you in fact not asking for a possibility from a SharePoint server?

You can of course use a webservice do manage the job and let the files go in
the server folders from your users.

However I would never do that on the open webserver.

Just my idea.

Cor
Feb 7 '06 #2

P: n/a
CMM
> because of obvious reason, this server will not have access to any
shared directory on the network.


You can create a service on the internal machine to monitor the the
directory where files are placed using the FileSystemWatcher classes (it
works over the network too) and pull in the file.

But, I'm curious... what's the obvious reason you state? You can create a
locked down domain account for the network share you want to move the files
to and have your web app impersonate the limited account to copy the files
itself. I dunno...

I guess if you don't trust built-in OS filesystem mechanics and security you
can have the the web service communicate with another service across the
network (a remoted .NET application?... or- the equivalent- possibly another
web service internal to the LAN?). But, I don't see how that's any better
than the simpler solutions above.
Feb 7 '06 #3

P: n/a
Sue
Having a shared directory is not an option..(don't ask why, the higher
up's have made that decision) Web service is the last option to
consider...I was asked to look to see if the (200mb) huge file can be
stored in a byte array and streamed across the network...

Also, do you know what is the max limit for a byte array...

Feb 7 '06 #4

P: n/a
CMM
A file *is* a byte array. AFAIK there is no limit on how large a byte array
can be.... though there are RAM considerations with such a huge file. You
will probably want to use a filestream instead as it is optimized to buffer
file contents as it reads them.

Is the problem that you need to throttle the file across the network so that
it doesn't swamp the LAN?

In any case, a novel approach that addresses all your problems would be to
set up an internal FTP server (this is built into Windows Server as an
optional component I think). If you need to throttle the transfer, FTP
server has throttle settings so you don't swamp the network with your 200mb
file transfers. You can even have the web service communicate directly with
it as neither has any domain rights (both run as a locked down web user
account)... that would solve your problem no?

Alternatively, I think the FileSystemWatcher is viable... whether you put
the service on the web server and "push" the file across the LAN or put it
on the destination and "pull" the file. If you need to throttle the file
copy, you would read the file in several bytes at a time (perhaps at some
millisecond or second interval). But, in that case, I think the Internal FTP
server solution is way more robust and easier to implement.

"Sue" <iy*********@hotmail.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
Having a shared directory is not an option..(don't ask why, the higher
up's have made that decision) Web service is the last option to
consider...I was asked to look to see if the (200mb) huge file can be
stored in a byte array and streamed across the network...

Also, do you know what is the max limit for a byte array...

Feb 7 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.