473,657 Members | 2,571 Online
Bytes | Software Development & Data Engineering Community
+ 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 1499
<mp*****@hotmai l.comwrote in message
news:46******** *************** ***********@l64 g2000hse.google groups.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\myshared files\myfile.do c

Just a thought,

Mark

*** Sent via Developersdex http://www.developersdex.com ***
Jun 27 '08 #3
"Mark" <an*******@devd ex.comwrote in message
news:%2******** ********@TK2MSF TNGP04.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\myshared files\myfile.do c
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
2916
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 upload files, like this: copy ($myfile, $uploadfolder . "/" . $myfile_name); Everything works fine, it can process large files and everything, but i need to make sure that people only upload pictures, so i change
4
4474
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 one of my webform pages which includes a button that pops up a window where you can upload files, if you upload files in this popup window, it seems to somehow clear out all of the session variables and the users get logged out. However, if...
4
1676
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 FTP client into my code. I can log into my FTP Server, PWD, CWD, etc just fine. The problem starts when I try to upload a file. The part of the code that is supposed to upload the file will run without any errors, but when I login to my FTP...
0
4749
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 verdiği hata şu.Bilen arkadaşlar lütfen yardım edin Persits.Upload.1 error '800a0020' The system cannot find the path specified. /classifieds/upload.asp, line 250
9
3824
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 site for a small club I belong to and one of the features I would like to include is the ability to allow users to upload image files. unfortunately the servers web root www folder only allows READ and EXECUTE permissions, which makes it...
7
3181
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" name="file_1" size=46 /><input type=submit /> so, after adding a few files, the input fields look like this:
5
3278
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 _uploadedfiles_xxxx) (php must be allowed to move uploaded files to this folder' - uploadedfiles_xxxx. I typed <?php chmod ('_uploadedfiles_xxxx',640); ?> into notepad and saved it as php in the uploaded_xxxx folder, when I went to test it, the error...
4
4876
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 mydirectory, but for some reason, I am getting different file names on the database. Here is the full code: please do serach on kewword "database" to see where I added my database code - that where I need help with. And here the link where I got it...
1
5713
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 this is my codes, Set Upload = Server.CreateObject("Persits.Upload.1") Count = Upload.Save("d:\cmsupload\cimg\") for each File in upload.Files ' '...sme operation here..
0
8392
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8730
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8605
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7321
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6163
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4151
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4301
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
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 we have to send another system
2
1950
muto222
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.