In fact, this is a problem that everyone can think of.
The purpose of writing it is to solve one aspect of the security problem in the C2C platform that is about to be developed - source code leakage.
In order to avoid source code leakage and improve operating efficiency , you can encapsulate part of the core program of the ASP program in a DLL file. Currently, the more common way is to use VB to encapsulate the ASP code.
After installing IIS under the windows system, you should have the Microsoft Active Server Pages Object Library. Right? I don’t know why some documents say Microsoft ActiveX Data Object 2.0 Library... What does it have to do with the database? Confused... Of course, if you operate the database, you should use this reference.
It can be convenient in the ASP page Use the following method to call the class, so that the DLL file we encapsulate is responsible for passing the ASP code to the server for processing.
Set ObjReference=Server.CreateObject("ProjectName.ClassName")
Whenever the user accesses a system platform For ASP files with custom components, IIS will put forward our customized objects in the class definition in the component for us to use. We can design ASP methods and attributes that implement a certain function in this class definition. As long as ASP's built-in objects have been declared in this class, and of course we can access all ASP built-in objects. The specific methods are available in many documents, and you can find them by just browsing.
Just imagine, when we design the specific functions of the system Sometimes, you can encapsulate the differences between administrator permissions, user login and even transaction processes, which are more secure and frequently called, in a DLL. This not only effectively increases the security factor, but also improves program running efficiency. Important, because these are used on the business platform at any time. According to specific needs, we can define many classes in this custom component, for example, the verification part is called Eshop.Checkroot, and the transaction part is called Eshop.Transactions Something like that. Different classes are called when using different functions. It can be said that object-oriented programming is applied to ASP...
The most unpleasant thing about this method is that it is not suitable for users of virtual hosts because the components cannot be registered into the system. .So it is more suitable for those large systems that have their own servers.
The design of this kind of DLL file should also be possible in VC++. For example, the production of COM components should be the solution. Use ASP to call COM components. I am familiar with VC++. There is still too little research, and the pace must be accelerated...
I have written so much nonsense, I hope it can give some inspiration to people who use ASP to make B/S mode software.