Click here to Skip to main content
15,885,669 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have developed a windows application. I deploy that Project and I got Setup file (.exe). How can I upload the setup file to web server using WCF services and how to download (or) direct setup Install to client System.

I am beginner in WCF service.
Posted
Updated 9-Jan-15 20:13pm
v2

1 solution

Hi,

WCF is a framework used to connect different devices or applications, to a central hub (the Server in the WCF) for sharing the data and services among them. WCF is just not limited to sharing the text data, but binary data can also be shared among the network.

There was a problem inside the question, you were not saying whether you wanted to store the data on your own server, or some other third-party system. I am also not able to comment on your question, I do not know whether this is a new feature or a bug so I asked it here...

If you want to store the data on the system that you're admin of. Then you can allow the users to upload any file that they want to. Including .exe files, which are most of times thought to be a cause of virus, because many viral programs can be uploaded to the server causing different problems on the server once executed. So, if you're going to upload the file on a third-party then you're on the wrong side. You might want to convert the .exe file to a blob (binary data) file before sending it to them and then extract the binary back in format of .exe once extracting. But if you still want to use their system. Another method of doing so, is to make a zip archive of the files to be uploaded and downloaded and then shared on the network. Naked .exe files are mostly blocked by the application before user can be able to download it, or mostly users get to see an error message and do not download the file.

Since you're new to WCF, I might ask you to read this article that I've written a few months back. I was also a newbie since then, so I cannot impose anything on you to learn first.

Creating a Web Service to be consumed by connected Devices via Internet[^]

You will be able to understand the WCF framework, creating services, consuming these services and creating different clients for your project. You should know, that each and every client uses the same host and same code functions that you've written. So only thing that you need to worry about is to store the data on the server (mainly the hub you're creating for the WCF framework of your network). Uploading the file, is the same method as, Saving a file in .NET. You can get the code for that from MSDN, CodeProject (yes, this site you're on) or from any other website that you know. Every client would use the same code, and will be able to store the data on your hub space.
 
Share this answer
 
v2

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900