Query Federation & Custom Schema
Learn about the latest features including in the CData Connect Cloud data connectivity platform.
Date Entered: 9/15/2014 Last Updated: 9/15/2014
License and distribute the CData ADO.NET provider as a run-time component in your application.
CData ADO.NET providers use the .NET Licensing Scheme. Follow the steps below to add the license to your project as an embedded resource.
A license must be activated before the .NET Standard Provider can be used. To activate a license use install-license, a .NET Core application included with the Provider.
If the Provider was installed from a NuGet package, this application is present in the tools folder in the package installation directory. Typically the package can be found here on Windows: %USERPROFILE%\.nuget\packages\cdata.datasource
If the library was installed as part of the .NET Edition, the application is present in the lib/netstandard2.0 folders of the installation directory.
To use the install-license application run the command:
dotnet ./install-license.dll key
Where key is your product key. This will install a license on the particular system.Deployment
Deployment in .NET Standard/.NET Core requires a RuntimeKey (RTK) to be specified in the connection string of a CData provider. Email email@example.com to obtain an RTK.
Web Apps can be licensed by compiling App_Licenses.dll and deploying this assembly in the same folder as the executable and the CData assembly.
Follow the steps below to license an application that uses the Entity Framework. For example, MVC.
Copy the required CData assemblies into the same folder as the executable. The assemblies for CData ADO.NET providers are located in the lib subfolder of the installation directory. For .NET 4.0, ensure that you use the DLLs, located in the 4.0 subfolder in the lib directory.
All CData ADO.NET providers require the same assemblies. QuickBooks is used as an example below:
Use System.Data.CData.Entities.EF6 if you are using Entity Framework 6.
Add the provider key from Machine.config to the App.config or Web.config of your application or site. The Machine.config is located in the Config folder in the .NET Framework directory for your version of the .NET Framework. .NET 4.0 uses C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config and .NET 2.0 uses C:\Windows\Microsoft.NET\Framework\v2.0.50727\CONFIG. The App.config or Web.config should resemble the entry using QuickBooks below:
To deploy a Windows Forms application, App_Licenses.dll and the CData assemblies must both be in the same folder as the executable.
To deploy a Web app, the CData assembly and App_Licenses.dll must be located in the bin folder. Applications that use the Entity Framework require both the CData and CData Entities assemblies. Ensure that you copy the .NET 4.0 assemblies, located in the 4.0 subfolder of the lib folder where the provider is installed.
In most scenarios, you can build App_Licenses.dll by following the procedures above — add Licenses.licx to your project and right-click the license to select Build Runtime Licenses.
If the Build Runtime Licenses option does not work for you, you can build App_Licenses.dll in a separate project:
Building the project creates App_Licenses.dll. This assembly must be distributed in the same folder as your executable and the CData assemblies.
This error means that the CData assembly, such as System.Data.CData.QuickBooks.dll, has not been added to the project as a reference. You can find the assembly in the Lib folder where you installed the provider.
This error notifies you that the Machine.config entry does not match the assembly that you are using. To resolve this error, you need to copy several settings in the Machine.config file for the version of .NET Framework that you are using into your Web.config or App.config file. Please see the relevant procedure for your application type.
We appreciate your feedback. If you have any questions, comments, or suggestions about this entry, please contact our support team at firstname.lastname@example.org.