在asp.net中编译整个Web应用程序 [英] Compile whole Web Application in asp.net

查看:87
本文介绍了在asp.net中编译整个Web应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好





我使用C#在asp.net中创建一个Web应用程序我希望在部署到服务器之前编译整个应用程序用户无法读取或编辑代码。









我试试这个代码aspnet_compiler -p physicalOrRelativePath -v / targetPath -u





但它删除了我的所有Class文件和App_Code文件夹

解决方案

所以,你认为你可以阻止你的用户阅读你的代码,这样就可以在你的网站上赚钱吗?



让我成为跟你说话你不知道ASP.NET是如何工作的,最有可能的是Web是如何工作的。让我们来看看。编译的所有代码完全驻留在服务器端,从不下载到客户端。用户永远不会访问该代码。 因此,没有什么可以保护用户。您说用户,而不是您的Web托管公司的人员,人们如何真正访问您的服务器端代码。



现在,考虑一下:你希望在一些不知道ASP.NET真正做什么的人开发的ASP.NET产品上赚钱。不,我不是说它在理论上是不可能的,但是它不会让你对产品的真正价值产生一些怀疑吗?我宁愿考虑一些非常不同的东西:如何将你的工程技能提升到任何人为你支付至少一些工作的程度。当您获得足够的信心开发一些有价值的产品时,可能会花时间考虑从您的产品中赚钱。不要误会我的意思:也许你很强大,可以在其他领域生产有价值的产品,但我宁愿相信你会有足够的认知技能来快速弄清楚ASP.NET的作用。人们通常会学习如何完成这项工作,以及后来如何保护它。



-SA

源代码被编译成程序集并放在Bin目录中,从 ASP.NET编译工具(Aspnet_compiler.exe) [ ^ ]

如果有权访问服务器位置的人可以获得源代码,即使您将其编译为汇编。有解压缩.net程序集的工具。阅读如何保护我的.NET程序集免受反编译? [ ^ ]

Hi


I create a web application in asp.net using C# I want to Compile the whole application before deploying on server that the user not able to read or edit the Code .




I try this Code aspnet_compiler -p physicalOrRelativePath -v / targetPath -u


but it remove my all Class files and App_Code folder

解决方案

So, you think that you can prevent your user from reading your code and, this way, make money on your Web site?

Let me be frank with you. You have no clue how ASP.NET works and, most likely, how Web works. Let's see. All code which compiles resides entirely on the server side and never downloaded to the client side. The user never accesses that code. Therefore, there is nothing to "protect" from the user. You said "user", not personnel at your Web hosting company, people how really can access your server-side code.

Now, think about it: you hope make money on some ASP.NET product developed by someone who has no clue what ASP.NET really does. No, I don't say it's theoretically impossible, but doesn't it give you a little doubt on the real value of your product? I would rather think about something very different: how to grow your engineering skills to the degree when anyone would pay you for at least some work. When you gain enough confidence to develop some valuable products, it may come the time to think of making money from your products. Don't get me wrong: perhaps you are strong and can produce valuable products in some other fields, but I would rather believe that than you would have enough cognitive skills to quickly figure out what ASP.NET does. People normally learn how to do the job, much later how to "protect" it.

—SA


Source code is compiled into assemblies and placed in the Bin directory, you will not able to see .cs, .vb files after you compile from ASP.NET Compilation Tool (Aspnet_compiler.exe)[^]
if someone having access to server location can get the source code even you compiled it to assembly. there are tools to Decompile .net assemblies. read How can I protect my .NET assemblies from decompilation?[^]


这篇关于在asp.net中编译整个Web应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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