Click here to Skip to main content
15,112,079 members
Articles / Programming Languages / C#
Posted 28 Apr 2007


59 bookmarked

Zeta Uploader Windows Client

Rate me:
Please Sign up or sign in to vote.
4.67/5 (17 votes)
30 Jul 2011CPOL7 min read
Introducing the Windows Client for the Zeta Uploader service


Screenshot of the web-based frontend


In this article I'll show you the functions and the internals of the Windows client of our free Zeta Uploader service. While this is (of course) some kind of promotion of the service itself, I'm really sure that the code discussed here could be of some value to other readers.

The download for this article enables you to completely set up a client-server scenario in your own environment, without any connection to our services.

What is Zeta Uploader?

Zeta Uploader is a central service running on our web server to which you can upload large files and let it generate e-mail messages with a download link.

The basic idea is to avoid sending files, especially large files by e-mail but instead upload it to the Zeta Uploader website and send the receiver simply a download link to the actual file.

E-mail attachments do have limitations both in size and content, since most accounts limit the maximum attachment size to some few MB. Also usually some kind of file attachments are blocked, e.g. executable files. By using Zeta Uploader, a user can avoid these limitations.


I started developing this service approximately a year ago when I was in need of sending larger files to some of our customers. Since the customer's e-mail server rejected my attachments (because of the size), I started quickly hacking together the initial website and a web form to upload a file.

I wasn't aware that there are already a few other services like mine, namely YouSendIt or RapidShare. Maybe I wouldn't have developed the service at all, if I knew these before.

Zeta Uploader has a few advantages over these other services, at least in my opinion: You don't need the create any account at all - simply upload and you're done. In addition, our service is completely free. Third, the Windows client I'm discussing in this article is a feature that the other services seems to miss, too. Last, we delete the uploaded files automatically after 30 days, which seems to be later than other services.

Please note that I don't plan to make any money from the service at all. It is simply a tool that I developed due to my own needs and which I think of as being a benefit to other users, too.

But now on to the application itself...

The components of Zeta Uploader

Zeta Uploader consists of three parts:

  • A website with some web forms to upload a file through any web browser. Directly accessible at
  • A Windows client to install on your local machine to upload multiple files and/or folders by a few simple clicks in the Windows Explorer
  • A web service with which the Windows clients communicate to upload the data

This article discusses the latter two.

The Windows client


Screenshot of the Windows-based frontend

The Windows client is a Microsoft .NET Framework 2.0 Windows Forms application, i.e. in order to use, the .NET Framework must be installed on the system.

Once installed, the user has several options to upload a file:

  • Select multiple files and/or folders in Windows Explorer, then right-click and select "Send to" | "Upload with Zeta Uploader".
  • Start the Windows client from the start menu and add files and folders interactively through the "add" menu item.
  • Start the Windows client from the start menu and add files and folders by using drag and drop.

Once the user enters one or multiple receivers and adds an optional comment, he clicks the "Upload now" button.

All selected files and folders are locally compressed into a single ZIP file to reduce the size of the upload. After the compression, the compressed single file is uploaded via web services calls (SOAP) to the server.

The web service

The web service consists of the web service itself on the web server (ASMX file) and of the wrapper classes (the "proxy" classes) that are being used inside the Windows client to communicate with the web service.

I selected SOAP as the communication protocol (in contrast to e.g. FTP) because it has multiple benefits like really-easy development within Visual Studio .NET and since it is based on HTTP which most firewalls just easily allow to pass through.

Chunked uploads

Since I developed several upload functions inside other customer projects in the past, that are based on SOAP, too, I was aware that it is not "that" simple:

The most naive approach for uploading a file would be to have a web method like this one:

public void UploadFile( byte[] fileContent, string fileName );

Unfortunately this failed several times in the past: Especially when uploading large files, it is rather likely that the upload will be interrupted during the processing, due to several reasons (I remember one reason was a bloody ISA server on a heavily out-of-date server - I do hate this server personally!)

So I developed a different approach to make it more error-tolerant:

  • Instead of uploading one giant block of bytes, the upload process now sends multiple smaller blocks ("chunks"), currently 50 KB per block
  • In addition, each block could fail multiple times (currently 4 times) before the complete upload is being considered as failed. This allows for temporary connection problems without cancelling the complete upload
  • A global retry counter limits to total number of retries so that a permanent network error is detected by the system, too
  • Each uploaded block contains an ascending block number, enabling the server to detect lost packets

To encapsulate this functionality, I put the classes for the client part into a separate library called "ClientLib".

Image 3

Structure of the "ClientLib" Visual Studio project

The web part is contained within the web project called "Web".

Image 4

Structure of the "Web" Visual Studio project

Of course you'll find both projects in the download to this article.

Since I find it rather boring to read CodeProject articles with lot of code, I don't do this either and recommend that you simply download the article's code and open it inside Visual Studio .NET 2005.

What you can do with the code

You have several things that you could do with the code:

For example you could take the core web service communication library and put it into your own projects where you need error-tolerant upload functionality. Then you can even enhance the upload process further; e.g. in another project I implemented the ability to continue a previously interrupted upload. In yet another project I also built an error-tolerant "download", working similar to the upload of the Zeta Uploader.

Another option would be to simply take the source of the Windows client and enhance it or include it in your own application, while still communicating with the web server on "our" server. So you just enhance the client but re-use the server.

Last, you could just take the source code and build your own complete stand-alone environment where you set up your own web server and compile your own (possibly enhanced) Windows client.

And of course there are surely several other things you can do with the code that I simply cannot think of...

Web page code

Please note that I did omit the web pages from the article's download. These are the pages you see when navigating your browser to I did this, because I think that it is rather special to our own server and you'll get few, if any, benefits from downloading this code.

If you still require it, please drop me a line.


In this article I presented you the functions and some of the internals of the Zeta Uploader. I strongly hope this article is of some value and doesn't count as pure, stupid advertisement (to be honest, I'm not sure either, now after having written it...).

Anyway, I would be more than happy to get your feedback in the comments section at the end of this article. Feel free to ask your questions, provide me with suggestions and enhancements.

Of course you could use this code for whatever you want, no license or credits required (but I certainly would be glad to get a note if you developed a cool project with it).


  • 2011-07-30: Updated screenshot and some minor text changes.
  • 2007-05-01: Added complementary article about the content detection library.
  • 2007-04-28: Initial release of the article.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Uwe Keim
Chief Technology Officer Zeta Producer Desktop CMS
Germany Germany
Uwe does programming since 1989 with experiences in Assembler, C++, MFC and lots of web- and database stuff and now uses ASP.NET and C# extensively, too. He has also teached programming to students at the local university.

In his free time, he does climbing, running and mountain biking. Recently he became a father of a cute boy.

Some cool, free software from us:

Deutschsprachiges Forum zu Elektromobilität und Tesla  
Windows 10 Ereignisanzeige  
German Developer Community  
Free Test Management Software - Intuitive, competitive, Test Plans. Download now!  
Homepage erstellen - Intuitive, very easy to use. Download now!  
Send large Files online for free by Email

Comments and Discussions

QuestionIs it privacy aware ? Pin
Mazen el Senih2-Apr-12 0:42
professionalMazen el Senih2-Apr-12 0:42 
AnswerRe: Is it privacy aware ? Pin
Uwe Keim2-Apr-12 1:14
sitebuilderUwe Keim2-Apr-12 1:14 
AnswerRe: Is it privacy aware ? Pin
Mazen el Senih2-Apr-12 1:52
professionalMazen el Senih2-Apr-12 1:52 
GeneralRe: Is it privacy aware ? Pin
Uwe Keim2-Apr-12 1:54
sitebuilderUwe Keim2-Apr-12 1:54 
GeneralRe: Is it privacy aware ? Pin
Mazen el Senih2-Apr-12 2:03
professionalMazen el Senih2-Apr-12 2:03 
Generali don't like ASPX for uploaders Pin
el3ashe23-Apr-10 16:37
Memberel3ashe23-Apr-10 16:37 
QuestionPoll:: Would you avoid this service if it required one-time-signup? Pin
Uwe Keim3-May-07 9:13
sitebuilderUwe Keim3-May-07 9:13 
AnswerRe: Poll:: Would you avoid this service if it required one-time-signup? Pin
Phil.Benson6-May-07 22:47
professionalPhil.Benson6-May-07 22:47 
AnswerRe: Poll:: Would you avoid this service if it required one-time-signup? Pin
Galatei2-Aug-11 13:20
MemberGalatei2-Aug-11 13:20 
GeneralRe: Poll:: Would you avoid this service if it required one-time-signup? Pin
Uwe Keim2-Aug-11 20:21
sitebuilderUwe Keim2-Aug-11 20:21 
GeneralDownload Problems Pin
tigert2-May-07 4:33
Membertigert2-May-07 4:33 
GeneralRe: Download Problems Pin
Uwe Keim2-May-07 5:18
sitebuilderUwe Keim2-May-07 5:18 
GeneralRe: Download Problems Pin
tigertaylor2-May-07 5:20
Membertigertaylor2-May-07 5:20 
GeneralCulture problems Pin
Väinölä Harri30-Apr-07 1:46
MemberVäinölä Harri30-Apr-07 1:46 
GeneralRe: Culture problems Pin
Uwe Keim30-Apr-07 2:04
sitebuilderUwe Keim30-Apr-07 2:04 
GeneralRe: Culture problems Pin
Väinölä Harri30-Apr-07 2:13
MemberVäinölä Harri30-Apr-07 2:13 
GeneralRe: Culture problems Pin
Uwe Keim30-Apr-07 2:23
sitebuilderUwe Keim30-Apr-07 2:23 
GeneralRe: Culture problems Pin
Väinölä Harri30-Apr-07 2:32
MemberVäinölä Harri30-Apr-07 2:32 
GeneralRe: Culture problems Pin
Uwe Keim30-Apr-07 2:32
sitebuilderUwe Keim30-Apr-07 2:32 
GeneralRe: Culture problems Pin
kurimus1-May-07 23:39
Memberkurimus1-May-07 23:39 
GeneralRe: Culture problems Pin
Uwe Keim2-May-07 0:01
sitebuilderUwe Keim2-May-07 0:01 
Generalzeta Pin
YoSilver28-Apr-07 13:03
MemberYoSilver28-Apr-07 13:03 
GeneralRe: zeta Pin
Uwe Keim28-Apr-07 21:43
sitebuilderUwe Keim28-Apr-07 21:43 
GeneralRe: zeta Pin
Phil.Benson28-Apr-07 22:50
professionalPhil.Benson28-Apr-07 22:50 
GeneralRe: zeta Pin
Uwe Keim28-Apr-07 22:54
sitebuilderUwe Keim28-Apr-07 22:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.