如何在 Windows Azure 网站上存储文件? [英] How do I store files on Windows Azure Web Site?
问题描述
我刚刚阅读了一篇关于 Windows Azure 网站的文章,并想评估这项服务.我的公司刚刚开发了一个基于 ASP.NET MVC 的网站,使我们的客户能够下载我们提供的文件以及上传文件.
I just read an article about Windows Azure Web Site and would like to evaluate this service. My company just developed an ASP.NET MVC based website that enables our customers to download files we provide as well as upload files.
两者都基于我们发送的 URL.工作流程很简单:1. 我们登录我们的网站,上传文件并检索网站生成的链接2. 我们通过电子邮件将链接发送给客户3. 客户无需认证即可使用此链接,轻松下载文件.
Both works based on URLs that we send. The workflow is easy: 1. We login to our website, upload a file and retrieve a link generated by the site 2. We send the link to the customer by e-mail 3. The customer can use this link without the need to authenticate and easily download the file.
或者1.我们登录到网站并检索网站生成的上传链接2. 我们通过电子邮件将链接发送给客户3. 客户无需认证即可使用此链接,轻松上传文件.
Or 1. We login to out website and retrieve an upload link generated by the site 2. We send the link to the customer by e-mail 3. The customer can use this link without the need to authenticate and easily upload a file.
我们目前在我们自己的基础架构中本地托管此网站.该网站很少使用,文件也不大.我们只是将它们存储在我们的文件服务器上.
We are currently hosting this website locally in our own infrastructure. The Website is used rarely and the files are not that big. We are storing them simply on our fileserver.
我想知道如何在 WAWS 上托管这个网站,我的第一个问题是:我有哪些选项可以实际存储文件?第二:当客户下载或上传文件时,我们的网站会在内部向我们发送通知电子邮件.WAWS 可以做到这一点吗?
I would like to find out how to host this website on WAWS and the first question I have is: What options do I have for actually storing the files? Second: Our website sends notification e-mails to us internally when a customer downloaded or uploaded a file. Is this possible with WAWS?
推荐答案
如果你想在 Windows Azure(网站)中持久化文件,你应该使用 Blob 存储.您可能喜欢的功能:
If you want to persist files in Windows Azure (Web Sites) you should use Blob Storage. Features that you might like:
- 在此处上传的所有文件都会获得如下 URL:http://myaccount.blob.core.windows.net/somecontainer/somefile.txt
- 您可以使用自定义 CNAME 来获取 http://files.mycompany.com/somecontainer/somefile.txt
- 您可以通过 共享访问签名对 blob 应用安全性
- Blob 存储非常便宜李>
- 每个 blob 都在 Windows Azure 数据中心的三台计算机上复制.写入 blob 会更新所有三个副本,因此以后的读取不会看到不一致的结果.
- 地理复制可在相距数百英里且位于同一区域内的两个位置(即美国中北部和中南部之间、北欧和欧洲西部之间以及东部和欧洲之间)复制您的 Windows Azure Blob 和表数据.东南亚).
- 每个存储帐户限制为 100TB
- All files uploaded here get an URL like this: http://myaccount.blob.core.windows.net/somecontainer/somefile.txt
- You can use a custom CNAME to get http://files.mycompany.com/somecontainer/somefile.txt
- You can apply security to blobs through shared access signatures
- Blob storage is very cheap
- Every blob is replicated across three computers in a Windows Azure datacenter. Writing to a blob updates all three copies, so later reads won’t see inconsistent results.
- Geo-replication replicates your Windows Azure Blob and Table data between two locations that are hundreds of miles apart and within the same region (i.e., between North Central and South Central US, between North Europe and Europe West, and between East and South East Asia).
- Limited to 100TB per storage account
另一方面,Windows Azure 无法发送电子邮件.您需要通过第三方来执行此操作.我个人使用 Amazon SES 但 SendGrid 也是一个不错的选择,因为他们为 Azure 用户提供了特别优惠.
Sending emails on the other hand is not possible with Windows Azure. You'll need to do this through a third party. I personally use Amazon SES but SendGrid is also a good option since they have a special offering for Azure users.
这篇关于如何在 Windows Azure 网站上存储文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!