473,472 Members | 2,247 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Trying to upload files programmaticly

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
mp*****@hotmail.com
Jun 27 '08 #1
3 1490
<mp*****@hotmail.comwrote in message
news:46**********************************@l64g2000 hse.googlegroups.com...
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.
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...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Jun 27 '08 #2

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

*** Sent via Developersdex http://www.developersdex.com ***
Jun 27 '08 #3
"Mark" <an*******@devdex.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
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.
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Jun 27 '08 #4

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

Similar topics

4
by: Tihon | last post by:
Hello! I again need your help, just can't understand whats going on. Got this upload pictures form and it's having problem handling large files (~1.5 - 2 MB). Everything works fine if i just...
4
by: Matt Jensen | last post by:
Howdy I've got a rather strange issue occuring. I used forms based .NET authentication, although I'm also setting some session variables when people login. However, I've found when people use...
4
by: XxLicherxX | last post by:
Hello everyone, I have created an application that generates some files. What I want the application to do now is to automatically FTP these files to a webserver. I have started implementing an...
0
by: SEMIH DEMIR | last post by:
Sitelerden birinde verilen yabancı kaynakli bir scriptti duzenledim yanlız birseyin içinden bir turlu cıkamadım işin aslı ilk defa persistin upload componentini kullanacam yanlız suanki haliyle...
9
by: Wayne Smith | last post by:
I've come up against a major headache that I can't seem to find a solution for but I'm sure there must be a workaround and I would really be grateful of any help. I'm currently building a web...
7
by: pbd22 | last post by:
hi. i am having probs understanding how to grab a file being uploaded from a remote client. i am using hidden input fields for upload such as: <input id="my_file_element" type="file"...
5
by: camphor | last post by:
hi, I have found an upload script in hotscripts and have implemented it into the website, I followed the installation steps to 'give write permissions to php on the upload folder (which is...
4
by: MoroccoIT | last post by:
Greetings - I saw somewhat similar code (pls see link below) that does mupltiple files upload. It works fine, but I wanted to populate the database with the same files that are uploaded to...
1
by: achotto | last post by:
hi, i try to upload a multiple image files. after that i will rename the files name. the problem is when i upload a 2 or more same files name exp-goal.jpg, it will return "files already exist". ok...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.