I have created a .net windows form application that I want to restrict from being duplicated. I want this application to be portable, so I would like to allow it to be moved. How would I be able to do this without managing it through a remote server?
That's a pretty elusive target.
The tighter you bind your application to a particular location, the less happy your customers will be with you whenever the inevitable computer maintenance comes up. And it comes up quite frequently.
One trick is to bind to particulars within the hardware of the device. MS Windows XP and additional MS products are a good case study on this approach. This usually requires a phone home or call to somewhere approach.
Another method is to have the application phone home with the registration code to receive an unlock signal. Win 7 and Win 2008 enterprise licensing use this approach. Quite a few other applications do this as well. Again, generally, you need a remote server available to be called. MS allows enterprises to set up their own license servers though.
Dongles are yet another method. They're kind of expensive to get started with, and they don't slow down the true crackers (or is that crackerz?).
You could always time-bound your activation codes, say for 24 hours or a week. After the time period expires, a new code has to be issued.
At some point, you need to trust that your users aren't going to rip you off. If you think about it, they're trusting you to give them a quality product, so it's not unfair for some of that trust to be reciprocated.
While this is not a solution, it may help shed some light on some of the threats and your options. As @GlenH7 says "That's a pretty elusive target.". I need to mention here that I am not an excerpt in this field, so take the advice with a grain of salt!
You could use the technique of binding your software key to the Hard Drive Volume Serial Number. The downsides are:
1 - If your user re-formats the disk, they will probably need to contact you again unless they use the same old serial number.
2 - There are programs that allows for Hard disk serial number change. So if your user knows about this, he can distribute the software and use this program to fool your program. To prevent this, you may need more information about the hardware to incorporate it in your code. You may then want to use a utility to provide such information such as CPUID-PRO.
The other threat is the the end-user may be able to reverse engineer your code from assemblies and get your db schema as well. I am not sure there are easy and effective ways against that.