473,777 Members | 1,715 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Save a file on the Server from Client

Hi All,

I want to be able to save a file from the client's PC on the server. The
tricky part is the aspx page is never actually seen by the user. Basically,
I have a VB application running on the client PC, it calls an aspx page and
passes some data as query srtings, including the full path to the relevant
file(s) on the client PC.
For example, the VB app might call the page thus:

http://www.mysite.com/uploadfile.asp...:\somefile.doc.

I need the aspx page (upload.aspx) to retrieve the file from the client PC,
and then save it in a subfolder of the application root,

For example: c:\inetpub\wwwr oot\mysite\file s\somefile.doc

Any help greatly appreciated.

Cheers,

MG
Nov 17 '05 #1
4 1672
the server side part is just a simple page upload aspx, and there are lots
of examples around on how to do this. You will need a VB client that
understands HTTP and for that have a look at this thread

http://forums.devshed.com/t45991/s.html

--
Regards

John Timney (Microsoft ASP.NET MVP)
----------------------------------------------
<shameless_auth or_plug>
Professional .NET for Java Developers with C#
ISBN:1-861007-91-4
Professional Windows Forms
ISBN: 1861005547
Professional JSP 2nd Edition
ISBN: 1861004958
Professional JSP
ISBN: 1861003625
Beginning JSP Web Development
ISBN: 1861002092
</shameless_autho r_plug>
----------------------------------------------

"Mr Gordonz" <pa**@mobius.ne t.au> wrote in message
news:eQ******** ******@TK2MSFTN GP12.phx.gbl...
Hi All,

I want to be able to save a file from the client's PC on the server. The
tricky part is the aspx page is never actually seen by the user. Basically, I have a VB application running on the client PC, it calls an aspx page and passes some data as query srtings, including the full path to the relevant
file(s) on the client PC.
For example, the VB app might call the page thus:

http://www.mysite.com/uploadfile.asp...:\somefile.doc.

I need the aspx page (upload.aspx) to retrieve the file from the client PC, and then save it in a subfolder of the application root,

For example: c:\inetpub\wwwr oot\mysite\file s\somefile.doc

Any help greatly appreciated.

Cheers,

MG

Nov 17 '05 #2
Well, one thing you definitely don't want to do is to have your web server
have file browsing permissions on all of your clients - that would be a huge
security hole. Instead, you should simply post the data. To make it easy,
perhaps you could have a hidden internet control holding an input type=file
control that you can use to post the data, or you could just cook up your
own post mechanism.

--
Chris Jackson
Software Engineer
Microsoft MVP - Windows XP
Windows XP Associate Expert
--
"Mr Gordonz" <pa**@mobius.ne t.au> wrote in message
news:eQ******** ******@TK2MSFTN GP12.phx.gbl...
Hi All,

I want to be able to save a file from the client's PC on the server. The
tricky part is the aspx page is never actually seen by the user. Basically, I have a VB application running on the client PC, it calls an aspx page and passes some data as query srtings, including the full path to the relevant
file(s) on the client PC.
For example, the VB app might call the page thus:

http://www.mysite.com/uploadfile.asp...:\somefile.doc.

I need the aspx page (upload.aspx) to retrieve the file from the client PC, and then save it in a subfolder of the application root,

For example: c:\inetpub\wwwr oot\mysite\file s\somefile.doc

Any help greatly appreciated.

Cheers,

MG

Nov 17 '05 #3
Hi John,

I'm sorry - I should have made myself more clear. I already have the VB
client - what I need is some sample code for the upload.aspx page. I have
found lots of examples, but all of them use the <input type="file"> HTML
control and the user is prompted on the actual aspx page. In this case the
user will never see the page. I have been unable to find an example that
doesn't make use of the <input type="file"> control. Can you point me to a
forum or something similar with an example of what I am trying to do?

Cheers,

MG
"John Timney (Microsoft MVP)" <ti*****@despam med.com> wrote in message
news:uU******** ******@tk2msftn gp13.phx.gbl...
the server side part is just a simple page upload aspx, and there are lots
of examples around on how to do this. You will need a VB client that
understands HTTP and for that have a look at this thread

http://forums.devshed.com/t45991/s.html

--
Regards

John Timney (Microsoft ASP.NET MVP)
----------------------------------------------
<shameless_auth or_plug>
Professional .NET for Java Developers with C#
ISBN:1-861007-91-4
Professional Windows Forms
ISBN: 1861005547
Professional JSP 2nd Edition
ISBN: 1861004958
Professional JSP
ISBN: 1861003625
Beginning JSP Web Development
ISBN: 1861002092
</shameless_autho r_plug>
----------------------------------------------

"Mr Gordonz" <pa**@mobius.ne t.au> wrote in message
news:eQ******** ******@TK2MSFTN GP12.phx.gbl...
Hi All,

I want to be able to save a file from the client's PC on the server. The tricky part is the aspx page is never actually seen by the user.

Basically,
I have a VB application running on the client PC, it calls an aspx page

and
passes some data as query srtings, including the full path to the relevant file(s) on the client PC.
For example, the VB app might call the page thus:

http://www.mysite.com/uploadfile.asp...:\somefile.doc.

I need the aspx page (upload.aspx) to retrieve the file from the client

PC,
and then save it in a subfolder of the application root,

For example: c:\inetpub\wwwr oot\mysite\file s\somefile.doc

Any help greatly appreciated.

Cheers,

MG


Nov 17 '05 #4
I should have mentioned this in my original post but here is how the
application currently works:

The user runs a VB app on his/her PC. The app prompts the user to select a
file (or files). The app then uploads the file(s) to the web server
(effectively pushing the files up). In addition, the app calls an aspx page
and passes the file name (and a few other bits of data) to the page as query
strings. The page then writes the data to the database.

I want to modify the aspx so it pulls the file from the client, as well as
the other things it currently does. The VB app would simply pass all the
relevant info to the page, and the page would do all the work. To prevent
someone calling the page without using the VB app, the app passes an
encrypted string that the page uses to verify that the page has been called
legitimately.

If this presents a security risk, I would be grateful if someone could
explain how.

Cheers,

MG


"Mr Gordonz" <pa**@mobius.ne t.au> wrote in message
news:eQ******** ******@TK2MSFTN GP12.phx.gbl...
Hi All,

I want to be able to save a file from the client's PC on the server. The
tricky part is the aspx page is never actually seen by the user. Basically, I have a VB application running on the client PC, it calls an aspx page and passes some data as query srtings, including the full path to the relevant
file(s) on the client PC.
For example, the VB app might call the page thus:

http://www.mysite.com/uploadfile.asp...:\somefile.doc.

I need the aspx page (upload.aspx) to retrieve the file from the client PC, and then save it in a subfolder of the application root,

For example: c:\inetpub\wwwr oot\mysite\file s\somefile.doc

Any help greatly appreciated.

Cheers,

MG

Nov 17 '05 #5

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

Similar topics

14
2683
by: edykstra | last post by:
Hello, If you point your browser to this page, http://prdownloads.sourceforge.net/vnc-tight/tightvnc-1.2.9_x86_viewer.zip?use_mirror=umn the server sends you the HTML page, and very soon afterwards, you are prompted to do a 'Save-As' for a file to download. How do they do that without the classic "Headers already sent" error?
1
1887
by: lc | last post by:
Hi, Is there a way to save the client side opened asp page as a image file to the server side. That is take a screen shoot of the page and save it as a file preferrable html file or some image file and save it onto the server. Thanks.
5
7974
by: Rajani | last post by:
How can i save the textarea(retrieved from DB) data to client system as a textfile. I am using filesystemobject to create a text file with the path set fso=server.createObject("scripting.filesystemobject") set ctext=fso.createtextfile("c:\mydata.txt",true) ctext.close set ctext=nothing set fso=nothing
4
4013
by: Nikhil Tayal | last post by:
Is there a way to write a file on the client machine from an aspx page? I've a custom query page and need to store the search criteria specified in an XML file on the user machine from my web page (aspx). I form the XML at run time from the search fileds specfied by the user and now my aspx page should save it on client machine so that the user can open the same query on next visit of the page. And help is appreciated. Nikhil
6
1795
by: jake | last post by:
How do you get or save a file from/to a client (button on web page) once they are authenticated? The client could be Mac, Linux or Windows. Can I do it all with IIS and ASP.NET?
8
2699
by: DanB | last post by:
This is probably soooo simple but I can't seem to get it. I have a text file that I want users to download via a web page. I want the file to be saved to a default folder (or one that they choose) on the users / client file system. I have toyed with a Self-Extracting zip file but the contents of my zip file changes each time it is downloaded so that invalidates the exe file. Also the text file is so small it is a waste to zip it.
6
4016
by: Pat Carden | last post by:
Hi, We need to allow webusers to upload a file on our website (on Server3, all servers run Server 2003, remotely hosted) and eventually save it on our SBS Server (Server2) which is not exposed through our firewall. We have another server (Server1) within the SBS domain that is exposed through port 80 of the firewall on which we host some web services and images. What is the best architecture for getting the file from the remotely...
4
2577
by: Matt | last post by:
Hi, I would like to save a file locally (on the client computer) in an ASP.net application. It is like the server would return some data that the user can save to a file on his local PC. The ASP page has a text field to type in the file path directly and a "Browse..." button, that shall display a "Save as..." dialog. I tried with the FileUpload control, but this does not work, since I do not want to upload an existing file, but I want to...
3
4356
by: evenlater | last post by:
I have an Access application on a terminal server. Sometimes my users need to export reports to pdf, rtf or xls files and save them to their own client device hard drives. They can do that right now the way I have this set up, but it's confusing and slow. When they browse for a place to save the reports, they see all of the drives on the terminal server as well as their own client drives. So they're likely to want to choose "My...
0
10292
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10061
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9923
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
8954
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...
0
6722
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5368
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
5497
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4031
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
3
2860
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.