I am doing contract work for various clients and I was wondering how best to go about safeguarding myself against non-payment. The projects will be ASP.NET web applications, most likely intranet-based.I don't have any more details than that. I imagine that the client will want to run and test the applications from their side before making any payment. Is there any way I can package the application so that they can't access the source code? Is there an easy way I can make the application break after a certain number of days unless it is unlocked by me?
Clever way to license/obfuscate web applications until the client has paid for it
licensing;asp.net;freelancing
Unless you install your ASP.NET application on hardware that you alone have admin on, no.  An unscrupulous client can take without paying, and pay some unscrupulous programmer to work around any trap you leave.Include clauses in your contact allowing you to collect both interest and collection expenses if they fail to pay on time, and requiring that they destroy any software you provide if they reject the final product.  The whole point of having a contract is for when things do not go as planned, and no amount of shenanigans in the program will let software do a contact's job.Of course, that said, the way to avoid the issue altogether is to host the development code yourself on something like Windows Azure, and only install it on their hardware after you've been paid for development.  (Deployment and admin are separate functions that you can either not provide or bill seperatly for.)