22 Replies - 1189 Views - Last Post: 04 April 2012 - 10:35 AM
#1
Write code that allows people to download a file
Posted 02 April 2012 - 12:56 AM
I have a small .exe program that I I have written in C#. I don't know how to make it possible for others to download this file. I know that I must put it on a server, but how do I write the code that can make people download this file from the server? Suggestions/tutorials are appreciated (I have not been lucky googling it, I don't know what to search for).
Thanks
Replies To: Write code that allows people to download a file
#2
Re: Write code that allows people to download a file
Posted 02 April 2012 - 01:05 AM
if you want people to download this file directly from the server. you have to make a download manger.
#3
Re: Write code that allows people to download a file
Posted 02 April 2012 - 01:22 AM
TOP most asked:
What does this error message mean?
FAQ 2: How do I debug
FAQ 3: How do I make Class1/Form1 talk to Class2/Form2
FAQ (Frequently Asked Questions - Updated Mar 2012
#4
Re: Write code that allows people to download a file
Posted 02 April 2012 - 01:50 AM
http://social.msdn.m...4a-9ec427a32689
#5
Re: Write code that allows people to download a file
Posted 02 April 2012 - 03:48 AM
#6
Re: Write code that allows people to download a file
Posted 02 April 2012 - 05:16 AM
#7
Re: Write code that allows people to download a file
Posted 02 April 2012 - 09:13 AM
You can also use MediaFire to host it there, the added benefit is you get statistics of downloads to help you keep track of how many people actually downloaded your program.
If you want users to install your application, the use something like ClickOnce. It's not easy, it'll take some research.
#8
Re: Write code that allows people to download a file
Posted 02 April 2012 - 10:47 AM
Thanks for the reply. I see that I wasn't clear enough in what I wanted to achieve.
Uploading the file on another site (Like media fire or so) wont do do, since I want people to download it from my homepage. So the question was how to do this, and what to search for (on google or any other search engine), to find the help.
I see that some of you have added some links, I'll take a look at those
Ps. Why did Gryphes get negative reputation while trying to help on this thread? Am I the only one who can't see anything
wrong with his post?
#9
Re: Write code that allows people to download a file
Posted 02 April 2012 - 10:52 AM
Quote
That's wrong.
If you just want to put a file for download on your web page, then upload it to your webserver and provide a link to the file?
#10
Re: Write code that allows people to download a file
Posted 02 April 2012 - 11:56 AM
JackOfAllTrades, on 02 April 2012 - 10:52 AM, said:
Quote
That's wrong.
If you just want to put a file for download on your web page, then upload it to your webserver and provide a link to the file?
Oh. I didnt know that uploading it to a server, and providing the link would actually make it possible to download it. I'll try that. Thanks :-)
#11
Re: Write code that allows people to download a file
Posted 03 April 2012 - 02:33 AM
JackOfAllTrades, on 02 April 2012 - 10:52 AM, said:
That's wrong.
If you just want to put a file for download on your web page, then upload it to your webserver and provide a link to the file?
Hey. I tried this, it doesn't work. I I upload the file to the server, and add the URL as a href, the page will just try to open the file without downloading it. In fact this looked very weird for a .exe file, it got opened in notepad, and a lot of weird symbols showed. How can it be fixed so that instead of trying to open the file, it downloads it?
Is there maybe a special place on the server that I should upload it? (as not in the public folder?)
#12
Re: Write code that allows people to download a file
Posted 03 April 2012 - 04:15 AM
This post has been edited by Nakor: 03 April 2012 - 04:20 AM
#13
Re: Write code that allows people to download a file
Posted 03 April 2012 - 05:30 AM
AOM_Set, on 03 April 2012 - 05:33 AM, said:
JackOfAllTrades, on 02 April 2012 - 10:52 AM, said:
That's wrong.
If you just want to put a file for download on your web page, then upload it to your webserver and provide a link to the file?
Hey. I tried this, it doesn't work. I I upload the file to the server, and add the URL as a href, the page will just try to open the file without downloading it. In fact this looked very weird for a .exe file, it got opened in notepad, and a lot of weird symbols showed. How can it be fixed so that instead of trying to open the file, it downloads it?
Is there maybe a special place on the server that I should upload it? (as not in the public folder?)
Think about what you are doing. You are putting an EXE on the internet for other's to download. The browser they use will probably see this as a possible virus or other drive-by download and not allow it. You need to ZIP it and have the user's download the ZIP file.
#14
Re: Write code that allows people to download a file
Posted 03 April 2012 - 10:06 AM
Firstly, if the user clicks on the URL (as a href), he gets redirected to the homepage where the server is.
This is the URL: https://www.unoeuro....l/RecordAPP.rar
I am pretty new to this, so there is probably something totally stupid about the way I do it. But the user gets redirected to this page (Unoeuro.com), where he needs to log in to the server to be able to get to the file. This is obviously pretty bad, and it still shows those weird symbols (When I log in and click on the file to download it) in notepad, even if it is packed.
The same goes if I add an URL to a .png file. Instead of downloading the file, it redirects to the homepage where my webhotel is. How can I do this?
#15
Re: Write code that allows people to download a file
Posted 03 April 2012 - 10:50 AM
|
|

New Topic/Question
Reply




MultiQuote






|