什么是存储在一个(asp.net + WCF)Web应用程序文件的最好方法 [英] What is the best way to store files in a (asp.net + wcf) web application

查看:152
本文介绍了什么是存储在一个(asp.net + WCF)Web应用程序文件的最好方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建使用asp.net和放大器的Web应用程序; WCF为3层结构,其中大部分是看起来像一个社交网站。用户可以使用该系统注册,他们可以上传他们的个人资料图片,文档,视频剪辑等,所以,我想知道什么是什么是存储这些文件的最好方法?在WCF端或Web应用程序的一面?

I'm creating a web application using asp.net & WCF as 3 tier architecture, which is mostly looks like a social website. Users can register with the system and they can upload their profile images, documents, video clips etc. So, what i want to know is what is the best way to store those files? In the wcf side or web application side ?

此外,我想知道,如果让我选择的web应用端将这些文件存储为一组文件夹,它是如何使这些文件夹的共享,并允许访问另一个不同的项目(如桌面客户端需要将文件上传到该共享文件夹)?

Also I want to know that, if i choose web application side to store those files as set of folders, how it makes those folders shared and allow access to another different project (such as a desktop client need to upload files into that shared folder) ?

谢谢大家提前。

推荐答案

我认为这个问题可以更好地放在这样的:

I think the question can better be put like this:


  • 保存在Web应用程序文件夹中或者附近,并有存储在数据库中的元数据

  • 通过WCF抓住从数据库中保存的图像

第二种方法很可能是相当缓慢的。在服务拼抢信息,将其转换,使用一个HttpHandler与正确的MIME类型的二进制流吐出到浏览器...

The second approach would likely be rather slow. Grabbing information over a service, convert it, use an httphandler with the correct mime type to spit out the binary stream to the browser...

大多数架构中的中间削减:保存图像关闭,或在中,UI层和具有关于它们存储在数据库中的元数据。该信息检索的大多只是一堆那么容易检索到的字符串。

Most architectures cut down in the middle: save the images close, or in, the UI layer and have the metadata about them stored in the database. Retrieval of that information's mostly just a bunch of strings so easily retrieved.

更新为新的问题:

由于应用程序的WinForms /等工程中你原来的问题没有偏离这个进入新的东西。在这种情况下你去一些以下情况:

Since winforms applications/other projects were not in your original question this deviates into something new. In that case you go for some of the following scenarios:


  • 使用WCF层作为一个共同点,存储服务背后的图像。正如我说,这将是一个额外的拉字节数组结束。

  • 存储图像在Web UI层和有服务(ASMX或WCF一个)将图像暴露给你的WinForms客户端。

  • 请在服务器上的客户端的WinForms A股,其中Web UI的运行速度,并在图像的。当然,一定要尊重安全和黑客可能。

这取决于最常用的方案是什么。我的假设是,网络用户界面层将被主要用于和所述的WinForms将要用于图像处理?如果是这样有可用于操纵等ASP.NET第三方控件以及因此需要一个WinForms客户端将减少。

It depends on what the most used scenario is. My assumption is that the web ui layer will be mostly used and the the winforms are going to be used for image manipulation? If so there are ASP.NET third party controls available for such manipulation as well so the need for a winforms client would decrease.

这篇关于什么是存储在一个(asp.net + WCF)Web应用程序文件的最好方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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