473,396 Members | 1,805 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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\wwwroot\mysite\files\somefile.doc

Any help greatly appreciated.

Cheers,

MG
Nov 17 '05 #1
4 1648
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_author_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_author_plug>
----------------------------------------------

"Mr Gordonz" <pa**@mobius.net.au> wrote in message
news:eQ**************@TK2MSFTNGP12.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\wwwroot\mysite\files\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.net.au> wrote in message
news:eQ**************@TK2MSFTNGP12.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\wwwroot\mysite\files\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*****@despammed.com> wrote in message
news:uU**************@tk2msftngp13.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_author_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_author_plug>
----------------------------------------------

"Mr Gordonz" <pa**@mobius.net.au> wrote in message
news:eQ**************@TK2MSFTNGP12.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\wwwroot\mysite\files\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.net.au> wrote in message
news:eQ**************@TK2MSFTNGP12.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\wwwroot\mysite\files\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
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...
1
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...
5
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...
4
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...
6
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
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...
6
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...
4
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...
3
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
0
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...
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...

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.