mvc或asp.net文件阻止下载阻止 [英] mvc or asp.net file prevent download block

查看:109
本文介绍了mvc或asp.net文件阻止下载阻止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好

我是sory ..我的英语不好

我不想下载文件



如何防止文件被下载?

我想保护我的文件(图片pdf)如何阻止下载?



或下载文件已损坏

谢谢

hello
I am sory..my english is not good
I don't want the download of files

How do I prevent files being downloaded?
I want to protect my files ( image pdf ) How do I prevent the download?

or download files are corrupted
thank you

推荐答案

如果文件可以下载到登录的客户端,您只需在发送文件之前验证下载文件的请求。这仅适用于您使用某种形式的身份验证。



如果客户端根本不允许下载文件,请从站点中删除它们。



否则,你无法阻止它。
If the files are available to download to logged in clients, you simply authenticate the request to download the file before you send the file. This only works if you are using some form of authentication.

If the clients are not allowed to download the files at all, remove them from the site.

Otherwise, you can't stop it.


这篇关于mvc或asp.net文件阻止下载阻止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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