如何保护或认证像服务器的视频和文档文件公开数据? [英] how to protect or authenticate public data like videos and document files on server?

查看:116
本文介绍了如何保护或认证像服务器的视频和文档文件公开数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要隐藏的文件的直接链接为未注册用户30秒我的网站,并显示下载延迟,就像主人MediaFire和RapidShare的事情。有什么办法来隐藏或混淆文件DOC,PDF,PPT,图像的链接和视频(最重要的),在服务器上(ASP)。

I need to hide the direct link of the files in my site and show download delay of 30 seconds for unRegistered users, Like mediafire and rapidshare do. Is there any way to hide or obfuscate the link of the files doc, pdf,ppt, images and Videos (Most Important), on server (asp).

推荐答案

有关的开始,您将所有的文件在受保护的目录(如的App_Data ),然后使用一个处理程序,向他们发送给注册用户。

For start, you place all that files on a protected directory (like the App_Data) and then you use a handler to send them to the registered users.

在里面你可以让你检查,如果用户是注册,如果他是来自网站,处理程序,如果该链接有超时等。

Inside the handler you can make your checks, if the user is register, if he comes from your site, if the link have time out etc.

有关如何使这个处理程序,这里是一些教程,但你可以找到更多,如果你搜索。结果
简单的文件下载保护与ASP.NET 结果
<一href=\"http://msdn.microsoft.com/en-us/library/aa478985.aspx#aspnet-jspmig-downloadinganduploading_topic6\"相对=nofollow> MSDN上的ASP.NET文件下载

For how to make this handler, here is some tutorials, but you can find more if you search.
Simple File Download Protection with ASP.NET
ASP.NET File Download on MSDN

另外你可能感兴趣的这个问题/回答:结果
<一href=\"http://stackoverflow.com/questions/10912164/what-is-the-best-way-to-download-file-from-server\">What是从服务器下载结果文件的最佳途径
<一href=\"http://stackoverflow.com/questions/14609389/error-handling-when-downloading-file-from-asp-net-web-handler-ashx\">Error从的ASP.NET Web处理程序(ashx的)

Also you may interesting for this questions/answers:
What is the best way to download file from server
Error handling when downloading file from ASP.NET Web Handler (.ashx)

这篇关于如何保护或认证像服务器的视频和文档文件公开数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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