I have create a web application which I want to sell to various clients with the source code. This application contains a DLL created by me having various methods outof which there is a method named ValidateLicenceKey(). I want this method to be called by each page for valid licence. To do this there are various ways ( as far as i know )-
- Create a BaseClass and call ValidateLicenceKey() method in baseclass and inherite this class on each page so that this method will be called on each page request.
- Call ValidateLicenceKey() method in Application_Start/Session_Start event of Global.asax file so that even if page is not inherited from Baseclass, this method will be called.
- Use of HttpModule and Call ValidateLicenceKey() method there and define that in web.config file
I am giving client the flexibility to add new pages/controls in the application as well as he can edit the existing code as per his requirement.
Now my question is- Since the client has the source code with DLL he can disable ValidateLicenceKey functionality by
- Removing the Baseclass inheritance from all the existing pages as well as do not implement Baseclass inheritance in the new pages created by him.
- Commenting the line that calls ValidateLicenceKey() method in Global.asax file.
- Commenting the line in web.config file that defines httpmodule
So how do i force them to call this method.
Is their any way to solve this? Please help.