如何使用http协议上传文件? [英] How to upload file using http protocol?

查看:930
本文介绍了如何使用http协议上传文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好

我想使用HTTP协议将文件从本地上传到远程,我希望在客户端使用窗口形式。
窗口上的
表示两个文本框,一个用于服务器URL,另一个用于本地文件。没有限制文件只发送特定服务器,但其工作动态意味着使用其凭据(如果有)上传任何服务器URL输入文件。

文件上传时服务器发回确认为对客户的回应即成功或失败。对此有任何想法。

我的回答非常感谢



提前感谢



[Wajid Khaksar]



我尝试过:



i访问很多网站,但找不到满足我要求的解决方案。

i我相信你们给我的好主意

解决方案

有很多选择,但我认为最简单的是:



SignalR 请参阅:http://www.codeproject。 com / Articles / 804770 /实现Signal-in-Desktop-Applications



如果你不能使用较新的.NET框架版本,那么你可以给网络服务试一试:

如何:托管和运行基本Windows Communication Foundation服务 [ ^ ]

hi everyone
i want to upload file from local to remote using HTTP protocol for this i want to used window form on client end.
on window form two text box one for server URL and other for local file. there is no restriction that file sent only specific server but its work dynamically mean whatever server URL enter file is uploaded on it using its credentials (if have).
when the file is uploaded server send back acknowledgement as response to client i.e success or failure. any idea about this.
your answer is highly appreciated for me

thanks in advance

[Wajid Khaksar]

What I have tried:

i visit lot of sites but could not find such solution that fulfill my requirement.
i am sure you guys give me excellent ideas about it

解决方案

There are lots of options, but the simplest I think are:

SignalR see: http://www.codeproject.com/Articles/804770/Implementing-SignalR-in-Desktop-Applications

If you can not use the newer .NET framework versions, then you could give Web Services a try:
How to: Host and Run a Basic Windows Communication Foundation Service[^]


这篇关于如何使用http协议上传文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆