monkeybiz Posted March 21, 2003 Posted March 21, 2003 Hi, I am creating a project that allows users to send and receive files to and from a Web Server. The problem is I do not know how to go about doing it:confused: . I try not to use ASP.Net and maybe ADO.Net cos I've got very little knowledge on these 2 languages. I am currently working on a windows application form, and would like to know if there is any way of connecting by means of a Connector or Socket or anything else I do not know of? I do really need help in this area as my deadline is just a week away from now. Any help will be extremely appreciated. Thanks in advance. Quote
*Gurus* divil Posted March 21, 2003 *Gurus* Posted March 21, 2003 I'm surprised you committed yourself to a project with a deadline a week away, not knowing how to do the task. You can use the WebClient class to easily download and upload data from and to a webserver. Check it out. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
monkeybiz Posted March 21, 2003 Author Posted March 21, 2003 Well actually.... Thanks for your help, I will go check it out. :) I noticed that in VB (not .NET) they have a component called Microsoft Internet File Transfer 6.0 where we can make ftp downloads and manipulate files. I was actually looking for something like that in .NET, however I couldn't find any... Hence I posted my problem in the forum Actually I have already finished my project but it was a last minute group decision to put my xml files onto a live web server. So I need to create that link to the web server. Once again, thanks for your help!! Quote
*Gurus* divil Posted March 21, 2003 *Gurus* Posted March 21, 2003 The WebClient is pretty much the .net replacement for that control, only it doesn't do FTP by default. You can, however, get plugins for it that let it do FTP (I'm told). Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
monkeybiz Posted March 21, 2003 Author Posted March 21, 2003 Hi, This is what i tried: WebClient1.BaseAddress = "http://www.blablabla" WebClient1.UploadFile("http://www.blablabla" , "test.txt") However they returned an exception: I notice that there is another way to use uploadfile by specifying the method but i'm not sure what methods there are? An unhandled exception of type 'System.Net.WebException' occurred in system.dll Additional information: The remote server returned an error: (405) Method Not Allowed. Anyway, I don't thihnk I canuse the Webclient, cos I also need to rename and delete and move the files around.. :( Quote
*Gurus* divil Posted March 21, 2003 *Gurus* Posted March 21, 2003 I have no idea how uploading files via http would work, anyway. Web servers are meant to provide pages for download, not serve as a way to upload files. That's pretty much where you want FTP. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
monkeybiz Posted March 21, 2003 Author Posted March 21, 2003 Oh no, that's the end of the webclient class then I'm afraid, but anyway, thanks alot for clearing up my doubts! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.