Applications that are created on ASP.NET Core require a unique license key. These licenses are bound to specified applications and are to be validated at runtime.
License key for the ASP.NET Core applications created on Visual Studio is generated through GrapeCity License Manager add-in provided in Visual Studio. Whereas, licenses for the applications created on IDE other than Visual Studio (VSCode, Sublime or Eclipse) can be generated on C1 Website.
To Generate License using GrapeCity License Manager Add-in
The add-in for generating Run-time License is available for all the MVC applications which are created in Visual Studio.
The add-in is visible in options within Tools menu in Visual Studio.
Complete the following steps to generate a trial or full license for your ASP.NET Core applications using Visual Studio add-in:
- Create a new ASP.NET Core MVC application. For more information. see Creating a new MVC Application.
- Add the required NuGet packages to your application through the NuGet Package Manager (Refer to Installation for steps to add Nuget packages).
- Click the GrapeCity License Manager add-in, from options within the Tools menu.
- In the GrapeCity License Manager window, enter your registered Email and Password to log in. In case you are not registered with GrapeCity, you can create a new account using Create an Account option.
- Once you log-in, you can choose any one of the following options. You login information will be cached for 30 days in Visual Studio.
- Activate/Deactivate Serial Number - Allows the users to activate or deactivate the serial number using the internet, C1 Website, By Email, or Over the phone.
- Generate App (runtime) Licenses - Allows the users to generate and activate license for each MVC application you are working on your system. This option is disabled for ASP.NET applications.
-
Update Project(s) - Select one or more projects from the loaded solution to:
- Modify all references to ComponentOne assemblies so that they are not version specific.
- Update all entries in the licenses.licx file so that they are not version-specific.
- Add entries in the licenses.licx file for referred dlls which have been already added.
*This option is disabled for ASP.NET Core applications.
- Contact Support - Allows the user to open http://supportone.componentone.com/ website where the users can communicate with the support team for any support related issues.
- In the GrapeCity License Manager window, select Generate App (runtime) Licenses option to generate a license for your MVC application.
Once you select this option the tool will detect the relevant C1 assemblies that are being used in the project or active solution.
- In the GrapeCity License Manager window, edit or select the Serial Number from the drop-down list, and then click Generate App (runtime) License to generate a license. In case you have a serial number which is not activated using C1LicenseActivation.exe tool, you can activate the serial number using the GrapeCity License Manager.
- Once you click on Generate App (runtime) License, a success message appears in the GrapeCity License Manager window.
An xml file GCDTLicenses.xml file is created and placed in the same location as the project file and it is an embedded resource to the project. It is recommended to close GCDTLicenses.xml and project.json files before executing the GrapeCity License Manager tool.
If you are generating a evaluation license, your application is now ready to use for evaluation purposes. You can repeat this process for any number of applications. You must generate a new evaluation license for each application because they are unique to the application name.
MVC for ASP.NET Core Fully Licensed Version
Fully licensed keys do not expire so long as your application uses a version of Studio Enterprise or Ultimate included with your subscription. You can update applications beyond your subscription end date so long as you continue to use a valid version of ASP.NET MVC Edition.
If you purchase ComponentOne Ultimate you are given a serial number. This serial number must be registered before you can generate full runtime licenses.
Complete the following steps to register your MVC for ASP.NET Core Serial Number:
- Visit https://www.componentone.com/MyAccount/MyLicenses.aspx and login using the ID that you want to use to generate runtime licenses for your ASP.NET Core MVC applications.
- Click Register a Product.
- Enter the Serial Number and Purchase Date and click Register Product.
To Generate License on C1 Website
Complete the following steps to generate a trial or full license for your applications (created on IDE other than Visual Studio) on C1 website:
- Create a new ASP.NET Core MVC application (Refer to Creating a new MVC Application for detailed steps).
- Add the required NuGet packages to your application through the NuGet Package Manager (Refer to Installation for steps to add Nuget packages).
- Visit http://www.componentone.com/MyAccount/MyASPNet.aspx.
|
Note: You must create a ComponentOne account and login to access this web page. |
- If you are generating a full license, select your serial number from the drop-down menu at the top of the page. If you are generating a trial license, leave it selected as Evaluation.
- In the App Name textbox, enter the name of your application.
|
Note: To find your application's name, in the Solution Explorer right click your project's name and select Properties. Open the Application tab, the application name is the same as the Default Namespace displayed. |
- Click the Generate button. A runtime license will be generated in the form of a string.
- Copy the runtime license and complete the following steps to add it to your application.
- Open your application in Visual Studio.
- In the Solution Explorer, right click the name of your project.
- Select Add | New Item. The Add New Item dialog appears.
- Under installed templates, select C# | Class.
- Set the name of the class as License.cs and click OK.
- Replace the content of the License.cs file with the code given below.
C# |
Copy Code
|
public static class License
{
public const string Key = "Your Key";
}
|
- From the Solution Explorer, open Startup.cs and assign the key to it as shown below.
C# |
Copy Code
|
public void ConfigureServices(IServiceCollection services)
{
C1.Web.Mvc.LicenseManager.Key = License.Key;
C1.Web.Mvc.Finance.LicenseManager.Key = License.Key
C1.Web.Mvc.Sheet.LicenseManager.Key = License.Key
C1.Web.Mvc.Viewer.LicenseManager.Key = License.Key
C1.Web.Mvc.MultiRow.LicenseManager.Key = License.Key
C1.Web.Mvc.Olap.LicenseManager.Key = License.Key
}
|
|
Note: The ComponentOne account that registers the serial number is the only account that can generate runtime keys for applications. This account, however, can generate keys from any system through the ComponentOne website. |