Click here to Skip to main content
15,886,799 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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
Posted
Comments
Suvendu Shekhar Giri 3-Aug-15 1:56am    
So what is the problem?
All your classes (inculding those in App_Code folder) are compiled in to dlls and can be found in the bin folder.
Sergey Alexandrovich Kryukov 3-Aug-15 2:28am    
The problem is very different. Please see my answer.
—SA
Suvendu Shekhar Giri 3-Aug-15 3:16am    
Yes. Haven't thought in that direction. My comment was based on the last few lines only.
Thanks :)

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
 
Share this answer
 
Comments
Suvendu Shekhar Giri 3-Aug-15 3:15am    
5ed. It should help OP about identifying his requirement.
Sergey Alexandrovich Kryukov 3-Aug-15 9:41am    
Thank you, Suvendu Shekhar.
—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?[^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900