I would like to do something with my C# .NET applications that when they are started, they check with a .php site to determine if the IP address of the machine is in a MySQL database. This would be perfect for me as I have specific machines I want to allow my applications to run on, but I want to prevent the clients from just taking the executable and running it themselves.
What would I need to look into to set something like this up? The part I really have no idea about is the authentication between a .php site and a C# .NET application.
You don’t need any authentication.
You just need to send an
HttpWebRequestto your server, have the server check the IP address, and replyYesorNo. (You can do this easily by callingWebClient.DownloadString)However, your enemies can modify the .Net assembly and remove the check. (This is rather easy to do)