Éric, there is a lot of confusion in the area of cryptography and security.
I think even the suggestions were good, but I believe there could be serious flaws there.
Getting the MAC does not seem like a good solution.
Does the answer to security (and non-encryption) always start like this?
How desirable is my application and my data? Would it be worth stealing my code and my database? If so, how much time and resources would it be worth to "invest in"? Example: Do you keep passwords without encryption, card data, or sensitive user information? If so, you should be very concerned.
Based on the above answer, what kind of people would try to steal my information?
Would they be interested in my algorithms or my database?
If your answer is that the data is desirable enough for high-level criminals, you can be sure that MAC encryption is not the solution. Many of the available servers use virtual machines, which would actually be very easy to clone physical MACs.
The truth is that the question you asked is the same question asked by security companies around the world, and yet they continue to fall under attack. I say this because the question is really serious. It's not hard to get .NET code and "decompile". There are code obfuscators. They can disguise the logic of your application very well, but not the security (encryption) you use. They have no power to change their passwords ... just try to hide them somewhere better.
The answer is simple, you are not secure in any way by hosting your website at an information provider other than your own. However great the security on the server, the key is usually to try to use your access password. Having your own requires skilled professionals in the subjects, but ends up being a lot easier.
Returning to the above questions, if your code is most valuable, invest in it. Use ways to obfuscate (.Net Obfuscator?). To have a slightly simpler control, you could have a site with a fixed IP that is not shared with other applications on the same server (strange, but it would not be impossible for someone to host another site on the same server and get the IP response) . Hence every time your system starts, you could check what your current IP is by asking the external and internal servers for your IP. Your external server could reliably verify that the IP of the call is that of the servers at your fingertips.
Then the encryption finally arrives. You could send an encrypted response authorizing the execution of your application. Remember to constantly change the key of your encryption (every 1 month or so) by doing deploys on your clients, updating both your external and application servers. Even if someone could take possession of every arsenal to "copy" their code, they would not be skilled enough to decrypt the sequences in time for a new deploy.
If the important information is in the database, the conversation needs to be totally different.