Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / May 2008

Tip: Looking for answers? Try searching our database.

Trying to upload files programmaticly

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mp33487@hotmail.com - 19 May 2008 15:22 GMT
I'm trying to upload/download files programmaticly to a records
management system.  I have it working fine on my dev machine using
vb.net code-behind pages but when I place it on the server when it
goes to upload files it (datatable of file paths and data stored in a
session var) it errors because the code can't find the files.  It
seems to be trying to read the file from the server drive not from the
client machine.  My code is meant to read the file into a memory
stream then feed it to a web service call that stores it into the DB.
Any ideas?

If there is a utlility that I can buy to programmaticly upload/
download files I'd do that well.  I need to do both actions without
user interaction and coordinate that with my web services to manage
the files and data.

Thanks in advance.

Mike
mp33487@hotmail.com
Mark Rae [MVP] - 19 May 2008 15:32 GMT
> I'm trying to upload/download files programmaticly to a records
> management system.  I have it working fine on my dev machine using
[quoted text clipped - 3 lines]
> seems to be trying to read the file from the server drive not from the
> client machine.

Yes, that's exactly what's happening. On your development machine, server
and client are actually the same physical machine...

> If there is a utlility that I can buy to programmaticly upload/
> download files I'd do that well.  I need to do both actions without
> user interaction and coordinate that with my web services to manage
> the files and data.

You have (almost) no chance whatsoever of doing this, for fairly obvious
security reasons...

Imagine a public website which could upload and download files to and from
client browsers without user interaction - you'd be surfing away quite
happily while the site was freely downloading malware and uploading your
accounts file, password list etc...

All modern browsers are designed specifically to prevent this sort of
functionality - don't even bother trying...

Signature

Mark Rae
ASP.NET MVP
http://www.markrae.net

Mark - 19 May 2008 16:03 GMT
I agree it does sound like a security nightmare - but would it not be
possible to 'share' a drive on each PC with the server.  Then the server
could then just reference the shared file area, eg.
\\mypc\mysharedfiles\myfile.doc

Just a thought,

Mark
Mark Rae [MVP] - 19 May 2008 16:09 GMT
> I agree it does sound like a security nightmare - but would it not be
> possible to 'share' a drive on each PC with the server.  Then the server
> could then just reference the shared file area, eg.
> \\mypc\mysharedfiles\myfile.doc

Ah, but that's not the same thing at all...

At that moment, the browser doesn't come into it...

It is the browser, not ASP.NET per se, which blocks unassisted downloads and
uploads

Take the browser out of the equation, and anything is possible. What your
suggesting is hardly any different from network utilities which deploy
patches and service packs to workstations.

Signature

Mark Rae
ASP.NET MVP
http://www.markrae.net


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.