如何在发布之前自动加密asp.net项目 [英] How to automatically encrypt asp.net project before publish

查看:216
本文介绍了如何在发布之前自动加密asp.net项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好

我是开发人员并使用Asp.net MVC创建Web应用程序并使用发布在Web服务器上传项目输出。

如何加密所有dll发布项目之前bin文件夹中的文件

解决方案

您无法加密可执行文件 - 它们需要在加载之前进行解密,因此它不实用,尤其是在网络环境中。



您可以对它们进行模糊处理 - 谷歌会帮助您 - 但如果您的网站安全性无论如何都可能不需要它。请记住,服务器代码(包括所有DLL文件)在服务器上执行,永远不会到达客户端附近。因此,您最好不要努力确保您的服务器文件系统被很好地锁定 - 无论如何您需要保护用于解密DLL的密钥 - 而不是等待大量时间来保护用户无法访问的内容反正。

Hi guys
I'm developer and create web application with Asp.net MVC and use publish to upload project output in web server.
How to encrypt all dll files in bin folder before publish project

解决方案

You can't encrypt executables - they need to be decrypted before they are loaded, so it just isn't practical, especially in a web environment.

You could obfuscate them - google will help you there - but it probably isn't needed provided your site security is up to scratch anyway. Remember that server code (and that includes all your DLL files) is executed on the server and never gets anywhere near the client. So you are much better off putting effort into ensuring that your server file system is well locked down - which you need anyway to protect the key you would have to use to decrypt the DLLs - rather than pending significant time protecting something that is not user accessible anyway.


这篇关于如何在发布之前自动加密asp.net项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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