开发者

Docx file transfer from server to client using httpwebrequest/httpwebresponse

In C# I've to write code for Docx file send from server application to client application using HttpWebRequest/HttpW开发者_如何学编程ebResponse 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 ...


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);
        }
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜