I have a task to automate sending zipped file with serialized data from window application to web application, and there is my problem i don't know how exactly do this, can I from window app send zipped file to controller action which would accept that file and unzip it? Probably this files will be large and i know if do this by ftp server or asp.net mvc (as webservice)
我有一个任务是自动发送带有序列化数据的压缩文件从窗口应用程序到Web应用程序,并且有我的问题我不知道这是怎么做到的,我可以从窗口应用程序发送压缩文件到控制器操作,这将接受该文件并解压缩?可能这个文件很大,我知道如果用ftp服务器或asp.net mvc(作为webservice)这样做
3 个解决方案
#1
ASP.NET MVC has nothing to do with web services, to my knowledge, though I suppose you could fake it.
据我所知,ASP.NET MVC与Web服务无关,尽管我认为你可以伪造它。
Why not use WCF, which is meant for web services?
为什么不使用WCF,这是用于Web服务?
#2
I don't think webservices handle binary data very well. I believe it has to be encoded in order to transfer which can increase the transfer size significantly. I'd recommend a hybrid solution.
我认为webservices不能很好地处理二进制数据。我认为必须对其进行编码才能进行传输,这会显着增加传输大小。我推荐一种混合解决方案。
Create a webservice which returns a ticket ID for the requested file. Pass the ticket ID to a URL to download your file using HTTP.
创建一个Web服务,返回所请求文件的票证ID。将票证ID传递给URL以使用HTTP下载文件。
#3
It won't be a binary data but some data in xml (lot of xml). The problem is: someone is locally adding some records to local database and the some of that data want to upload to website , and my problem is how to implement that export/import?
它不是二进制数据,而是xml中的一些数据(很多xml)。问题是:有人在本地将一些记录添加到本地数据库,其中一些数据想要上传到网站,我的问题是如何实现导出/导入?
#1
ASP.NET MVC has nothing to do with web services, to my knowledge, though I suppose you could fake it.
据我所知,ASP.NET MVC与Web服务无关,尽管我认为你可以伪造它。
Why not use WCF, which is meant for web services?
为什么不使用WCF,这是用于Web服务?
#2
I don't think webservices handle binary data very well. I believe it has to be encoded in order to transfer which can increase the transfer size significantly. I'd recommend a hybrid solution.
我认为webservices不能很好地处理二进制数据。我认为必须对其进行编码才能进行传输,这会显着增加传输大小。我推荐一种混合解决方案。
Create a webservice which returns a ticket ID for the requested file. Pass the ticket ID to a URL to download your file using HTTP.
创建一个Web服务,返回所请求文件的票证ID。将票证ID传递给URL以使用HTTP下载文件。
#3
It won't be a binary data but some data in xml (lot of xml). The problem is: someone is locally adding some records to local database and the some of that data want to upload to website , and my problem is how to implement that export/import?
它不是二进制数据,而是xml中的一些数据(很多xml)。问题是:有人在本地将一些记录添加到本地数据库,其中一些数据想要上传到网站,我的问题是如何实现导出/导入?