Hello! I am developing one program (with a paid subscription), I want to make sure that the program takes all the libraries from my server (if there is no subscription, the libraries should not be available). I have two questions:

  1. How to dynamically connect the dll, which is located on the server, when the program starts?
  2. How to make dll data available only from my program? To just download them was impossible.
  • one
    1. And here asp.net and asp.net-core? 2. What is your program? There is a question to edit button, use it and supplement your question with necessary information, while there are more questions for you than answers for you. - rdorn

2 answers 2

What you want to do is called RPC . In other words, you send the name of the function and its parameters to the server, and in return receive the result of the function.

The most convenient RPC mechanism is called SOAP . It is convenient in that the server provides a description of the functions in the form of a WSDL file, on the basis of which the code can be generated in any language. For example, if the server supports, then you can call the function sumOfTwoNumber(5,6) and it will return 11 . In this case, the generated code itself converts the function and parameters into a format that the server understands, sends it to the server, and receives a response from the server.

As far as I remember, in C # you can connect web services (human SOAP name) as simple packages. It must be borne in mind that the data between the client and the server are transmitted in XML format , because of which traffic can be large and slow. And without the Internet, functions will not work at all.

  • 3
    Web services (SOAP) have long been considered obsolete. It is better to use WCF or now fashionable WebAPI. - Alexander Petrov
  • one
    @AlexanderPetrov well, if it is fair, WCF behind the scenes just uses SOAP messages, in fact, in order to simplify working with SOAP, it was created .. - rdorn
  • Thank you, I will look this way) - Vladislav Golovlev

And what is a program like? ASP.Net application? And what kind of Dll? .Net assembly or Win32 dll? In the first case, hacking protection is pretty easy. In the second, see methods for protecting native Win32 applications. The only valid protection option for a pure .Net online application is to bring some functions to some services on your server that subscribers will access with their authentication tokens.