I’ve never written a white paper before, and well, I want to at some point, so this is the start to a white paper I want to write. Creating Licensed Web Controls. I’m getting a few questions on my blog about how to do this, so I’m going to start with some basics, a sample, and I’ll build from there.
Sample Licensed Web Control:
- Create a new website
- Add a new “Class Library” project (File -> Add -> New Project -> C# Class Library) called LicensedControl
- Remove the Class1.cs and replace it with the sample file (LicensedControl.cs). Add references to:
- <%@ register TagPrefix=”LicControl” Namespace=”LicensedControl” Assembly=”LicensedControl” %>
- <LicControl:WebCustomControl runat=”server” ID=”LicControl”/>
- You can pre-compile websites and roll them out. In this case, the APP_LICENSES.DLL is created and placed in the bin folder, but no .LIC files or LICENSES.LICX files are copied over to the pre-compiled web folder.
- If at any time APP_LICENSES.DLL is not auto-generated, it can be manually generated by right clicking on the LICENSES.LICX and choosing “Build Runtime Licenses”
- Licensed Custom Controls in the APP_Code folder do not work