How to share a folder in a asp.net web application with a win form client?

谁说胖子不能爱 提交于 2019-12-11 06:25:45

问题


In this asp.net web application, users can upload files to the server through a web interface. All the uploaded files are save in a server side folder. If I want to create a new win form desktop client (actually, its a WPF application) which can be used to upload files to that same server side folder as web interface does, how can I share that server side folder with that win form client? Any alternative suggestions are also welcome.

thanks for all in advance.


回答1:


Like answered in What is the best way to store files in a (asp.net + wcf) web application:

  • Use the WCF tier as a common ground and store the images behind that service. As I said it's going to be an extra to pull the byte arrays over.
  • Store the images in the Web UI tier and have a service (asmx or WCF one) to expose the images to your winforms/WPF client.
  • Make a share for the winforms/WPF client on the server where the web ui runs, and where the images are. Of course be sure to be respectful to security and possible hacks.



回答2:


Several ways; you could consider creating a web service on that same server, and the wpf app will communicate with this service. Or, if in the same network, it should be able to communicate via a network share, provided the proper permissions are set.

HTH.



来源:https://stackoverflow.com/questions/3362341/how-to-share-a-folder-in-a-asp-net-web-application-with-a-win-form-client

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!