Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 24th, 2004, 04:51 PM
Authorized User
 
Join Date: Mar 2004
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
Default Running FTP within VB .NET Application

Hi,

I want to send XML files out to the webserver within my VB .NET application. The only way I can think of doing it is running FTP within my application so all the user has to do is press a button and not have to worry about using FTP commands and passwords.

How do I go about this in VB .NET?

Please show some of the basic lines of code.

Regards

Kerry O'Carroll
__________________
Kerry O\'Carroll
 
Old September 24th, 2004, 08:35 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,101
Thanks: 0
Thanked 2 Times in 2 Posts
Default

I wouldn't use FTP like that. All you need to do is have a url that starts ftp:// and the browser (or their FTP program) will pick it up and download the file. You will need to enable anonymous access if you don't want them to have to type a password.

You could also have them save the file though http:// protocal.


Hal Levy
I am here to help you, not do it for you.
 
Old September 27th, 2004, 12:59 AM
Authorized User
 
Join Date: Mar 2004
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Hal,

I have looked at http and I am still a bit confused. What I basically want is to have under program control the facility to transfer files (eg XML and .JPEG) from my desktop out to the webserver. The way I do it manully is to use FTP or FrontPage, however this is not satisfactory if I want to automate it for users.

Any suggestions welcomed.

I am new to VB .NET so the question to you may sound very basic.

On another note, I have done FTP under program control over the years.

Regards


Kerry O'Carroll
 
Old September 27th, 2004, 08:53 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,101
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Does anyone use google anymore?

Search on "upload with ASP.NET" you will find many answers.



Hal Levy
I am here to help you, not do it for you.
 
Old September 27th, 2004, 11:52 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

You could write a web service that is hosted at the web server that will accept a binary stream of a file to save. If you are sacing XML, then you would only need to accept a text string. Then you consume the web service in your VB.NET windows application and use it to "send" a file to the webserver.
 
Old September 28th, 2004, 05:54 AM
Authorized User
 
Join Date: Mar 2004
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Peter,

Thanks for your direction with my problem. I have just read up about web services and have written one as a test.

Can you please confirm that I can run a web service from my Windows Desktop application as this is the point where I need to export my XML and .JPEG files to the Internet.

Regards

Kerry O'Carroll
 
Old September 28th, 2004, 01:27 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

You don't run the web service from the desktop application, you consume (or call) it.

The web service runs on the web server where you want the files to be received in the same way that you run the FTP server. Once the web service is set up you can make a web reference to it from your client application. This calls the web service over HTTP to upload the file(s).
 
Old September 28th, 2004, 04:25 PM
Authorized User
 
Join Date: Mar 2004
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Peter,

Thanks for your help. I now understand the processes to follow.

Regards


Kerry O'Carroll





Similar Threads
Thread Thread Starter Forum Replies Last Post
Uploading Text File to FTP server in vb.net KiruShan .NET Framework 2.0 4 July 29th, 2014 02:02 AM
FTP from inside VB.NET Program fig000 Pro VB.NET 2002/2003 33 June 11th, 2011 03:56 PM
FTP using windows Application(C#.Net) prasannagps C# 0 July 2nd, 2005 06:34 AM
Help Please:running C# and VB in one application? Sappu Classic ASP Basics 4 April 21st, 2005 02:13 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.