RadControls for ASP.NET AJAX Technical guidelines for protecting Telerik RadControls for ASP.NET AJAX binaries when redistributed with other applications
We are providing the following suggestions to protect our IP (Intellectual Property) when redistribute our assemblies as a part of shrink-wrapped software (packaged products).
Prerequisites
Protecting RadControls for ASP.NET Ajax requires the Telerik.Web.UI assembliy to be built from source code (due to modifications applied to the source files). The source code of RadControls for ASP.NET AJAX is distributed separately and is bundled with build instructions. Please read the source code building instructions beforehand.
For brevity this document assumes that the source distribution ZIP file is extracted in C:\RadControlsAjaxSource.
Instructions
Open C:\RadControlsAjaxSource\Telerik.Web.UI\Common\AssemblyProtection.cs in a text editor (notepad, Visual Studio etc)
Uncomment the following line:
CopyBefore:
public static void Validate()
{
}
CopyAfter:
public static void Validate()
{
ValidatePassPhrase();
}
Change the value of the ApplicationName constant to match the name of your application:
CopyBefore:
private const string ApplicationName = "MyApp";
CopyAfter:
private const string ApplicationName = "Sample Application Name v2.0 (tm)";
Save AssemblyProtection.cs and rebuild RadControls for ASP.NET Ajax (described separately in the source code build instructions document).
In your application replace the existing reference to Telerik.Web.UI.dll with the one built from source code.
If you run your application now you should see the following error message (“Sample Application Name v2.0 (tm)” will be replaced with the name of your application set in step 3):
Add the following code in the Page_Load method of your page codebehind class.
CopyCode:
Application["Telerik.Web.UI.Key"] = "Sample Application Name v2.0 (tm)";
Note |
|---|
IMPORTANT!!! Instead of “Sample Application Name v2.0 (tm)” use the value of theApplicationName constant from step 3. |