Reputation: 2033
I am building a website in asp/c# which I need to deploy to multiple servers which are managed by external people.
I need to avoid the people who have access to the server accessing and reusing our code.
One option that I have heard so far is that I can check the MAC-address inside the code, however, the MAC-address can be changed by the users.
What are the most secure options available to avoid this kind of situation?
Upvotes: 5
Views: 468
Reputation: 23300
The only 100% reliable method is not allowing others access to the actual deployed files.
Since code must work in the first place, a sufficiently motivated cracker will obtain the underlying source no matter what you do.
You can audit your deploy folders so you have an access log: you won't prevent any interaction, but you'll at least know who got what... Better than nothing.
Upvotes: 2
Reputation: 6566
If you need to do this, it suggests you're doing something wrong at the corporate level. The best proceedure is usually not to try to prevent piracy, but to embrace it. Make the code easily available to anyone, seed it on torrent sites yourself if need be, but only let it run in a very restricted way - say, only one connection at a time, so registering and buying a license show clear advantages.
If you also make your license clear and affordable, and there will be no motivation to pirate your software, and prevention is always better than a cure.
Upvotes: 0
Reputation: 20366
A web app normally cannot be completely "closed" source.
Besides the compiled DLLs (can be obfuscated) in bin, there must be a little "open source" in the view pages (.aspx, .ascx, .master, .cshtml)
If you want 100% closed, you may consider to use a non-standard way to serve the views so that you can pack everything in a DLL and write your http handler code to handle different URLs.
Upvotes: 0
Reputation: 7025
You have several options, but as commented by many... maybe they are not worth.
The only reliable one is:
Upvotes: 3
Reputation: 10012
You can 'publish' the website rather than put the whole source code up on the server, that turns it into a compiled website.
You can find a guide here
Upvotes: 0
Reputation: 100547
Option that gives you the most cotrol: don't deploy one external servers managed by external people.
Everything else will have less options to protect your code and you just need to decide at wich point price is ok to pay.
Upvotes: 1