限制文件上传和下载 [英] Restrict file upload and download

查看:97
本文介绍了限制文件上传和下载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

现在坐在.net应用程序中.在这里我想浏览所有内容,但我想限制从Internet上传和下载文件.用简单的语言,用户可以访问,即他们可以浏览.但是我想要限制上传和下载item.i正在等待您的宝贵答复.

here now am sitting at .net application.here i want to browse all the contents but i want to restrict file upload and file download from the internet.in simple words user can access i.e.., they can browse.but i want to restrict upload and download item.i am waiting for your valuable answers.

推荐答案

为什么不尝试编写防火墙规则,而是为此开发应用程序开发防火墙不是一件容易的事,特别是对于.net这样的框架,它具有很多安全循环.我最好的建议是在防火墙上创建规则以阻止用户操作. .NET应用程序

创建Windows服务以侦听所有OS事件
并捕获并阻止允许下载"对话框和打开文件"对话框发生的事件,但是您必须确保这些事件是由浏览器触发的,否则将阻止对这些事件的所有调用. >
这些URLS可以帮助

http://msdn.microsoft.com/en-us/library/ms644990.aspx
http://msdn.microsoft.com/en-us/library/microsoft.win32. systemevents.aspx
http://social.msdn.microsoft.com/Forums/zh/csharplanguage/thread/0417de9f-50b9-4d2b-a3df-6531d0af5a82

如果您可以进行一些调整,以将服务中的内容读入网页,那将是很棒的事情

http://msdn.microsoft.com/en-us/library/ms178713.aspx [ ^ ]
Why don''t you try and write a firewall rule rather developing an application for that .Developing firewall is not an easy task and especially with framework like .net it has a lot of security loops.My best suggestion would be to create a rule on the firewall to block the user action.If you are hell-bent on creating a .NET application

Create a windows service to listen to all OS events
and capture and block the events that allows the Download dialog and Open File dialog to occur,but you have to make sure that those events are triggered by a browser,or else you''ll be blocking all calls to those events.

These URLS could help

http://msdn.microsoft.com/en-us/library/ms644990.aspx
http://msdn.microsoft.com/en-us/library/microsoft.win32.systemevents.aspx
http://social.msdn.microsoft.com/Forums/en/csharplanguage/thread/0417de9f-50b9-4d2b-a3df-6531d0af5a82

This would be great if you could tweak in a little to read from the service into a web page

http://msdn.microsoft.com/en-us/library/ms178713.aspx[^]


这篇关于限制文件上传和下载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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