we have implemented a web application in asp.net 4.0 and customer needs us to give them the source code too so they can do the maintenance and limited improvements of application themselves ,but we need to make sure that they can not change the application and sell that to other customers,what is the solution?
Share
If you’re giving them the full source-code, the only way you can stop them from re-distributing it (either as source or as a compiled solution) is to make that a condition of the license agreement between them and you. There’s no way, in code, to enforce this that they can’t bypass by simply removing the code that enforces it.
If you can give them some components as compiled assemblies (for example; components they won’t need to change such as the Data Access Layer, or certain UI control libraries) you could place some form of license check within those libraries that does one of the following:
web.configfile matches the IP address of the server it’s running on (consider doing a blanket “allow” for requests that have come in on “private” IP address ranges such as 127.0.0.0 and 192.168.0.0, etc,.. to allow for their developers performing testing).If you do one of the two above items, bear in mind that this won’t stop them de-compiling the assemblies and removing the checks you’ve put in. You might want to consider obfuscating your compiled assemblies in this case.