user2605748
user2605748

Reputation: 79

Protect source code of an ASP.NET website

In our college they have competition--students have to develop and show some code. It has a cash prize. I have done an entry as a website (C#) using asp.net. The problem is that my website is in the computer laboratory of the college, so anybody can open Visual Studio and copy my project or edit it.

I want to protect my project. Is there any way to put password for the project alone in Visual Studio? To make it attractive I have hosted the website in the IIS of the server, so by using the IP adresss I can run the project anywhere with intranet access.

When I put a lock like EasyFileLocker, I am unable to open and run the project using the IP address.

I want to run my project anywhere in the intranet, but also protect its code.

How can I do that?

Upvotes: 0

Views: 2429

Answers (1)

Grant Thomas
Grant Thomas

Reputation: 45083

Presuming your source code is somewhere safe (if not, then put it somewhere safe over which you have control), then the deployed end result need not expose the source code in its raw format; you can pre-compile ASP.NET websites entirely (such that even the markup can't be edited on the server - at least not very easily) - do this by selecting the pre-compilation options on the deploy screen, being sure to uncheck "allow this website to be updatable".

the exact method of specifying the right build options differs between VS versions, but the options are the same ultimately: Precompile, (Don't) Allow precompiled site to be updatable.

The result is the code of your website ending up in binaries, including the page markup (the files still exist, but simply as placeholders with their substance missing.) For someone to get at your code, they'd need to reflect your binaries.

Upvotes: 3

Related Questions