Reputation: 307
In C# I've to write code for Docx file send from server application to client application using HttpWebRequest/HttpWebResponse classes without web browser.
I've worked out with sockets(TCP/IP), its works really fine. But I want to run with http protocol. Here i'm using Apache Tomcat 7 as webserver.
For example: server (application) assigned particular word file to client (application) then client download the assigned file with help of HTTP protocol using apache tomcat web server
Note: I didn't WCF services, I'm using only Windows application .. so tell me in that requirement manner ..
Thanks in advance ...
Upvotes: 1
Views: 1013
Reputation: 1922
Here's a simple example;
string myFileName = @"c:\temp\sample.docx";
using (WebClient wc = new WebClient())
{
wc.Proxy = null;
wc.DownloadFile("http://urlhere/Test.docx", myFileName);
}
Upvotes: 1