dotConnect for SQL Server Documentation
On this page
    Deployment
    On this page

    To deploy applications written with dotConnect for SQL Server, you should register run-time assemblies Devart.Data.SqlServer.dll and Devart.Data.dll in the Global Assembly Cache (GAC) for the appropriate framework or place them in the folder of your application (Bin folder for web projects). These two assemblies should be available in all applications written with dotConnect for SQL Server. Make sure that your project contains the license resource as described in Licensing.

    Another way to install the needed *.dll files is to launch the dotConnect for SQL Server setup program and choose "Minimal installation". Note that, according to the End-User License Agreement, this is the only installation you can do on the target machine. You must not distribute any other part of dotConnect for SQL Server.

    Applications written with dotConnect for SQL Server may not contain the license resource when they are deployed on the target machine where dotConnect for SQL Server is installed with the "Minimal" option.

    When your code uses dotConnect for SQL Server via a factory-based class, you should register configuration information in the DbProviderFactories section of the *.config file to inform your environment about the existence of the provider factory. The provider factory is described either in machine.config (globally), in app.config, or in web.config (just for your application). This is done as follows:

    <system.data>
      <DbProviderFactories>
        <remove invariant="Devart.Data.SqlServer" />
        <add name="dotConnect for SQL Server" invariant="Devart.Data.SqlServer" description="Devart dotConnect for SQL Server" type="Devart.Data.SqlServer.SqlProviderFactory, Devart.Data.SqlServer, Version=2.70.852.0, Culture=neutral, PublicKeyToken=09af7300eec23701" />
      </DbProviderFactories>
    </system.data>
    

    Replace 2.70.852.0 here with your actual version.

    Continuous Integration

    If you set up a pipeline for compiling your source code from a repository on a build server periodically or even after every commit, you should add a step to your pipeline for installing the provider on the build server, copying Devart.* assemblies and enabling automatic generation of the .NET Framework license resource from the provider entry in licenses.licx. For example, the corresponding step in Azure DevOps Pipeline can be the following one if you copied the provider installation to the root folder of your repository:

    - task: CmdLine@2
      inputs:
        script: '$(Build.SourcesDirectory)\dcsqlserver.exe /TYPE=FULL /VERYSILENT'
    

    For more information about the command line installation keys, see Installation.

    ASP.NET Applications

    When deploying ASP.NET applications, the following additional assemblies may be needed:

    Required Permissions

    When a dotConnect for SQL Server application is used in a partially trusted environment (which may apply to certain ASP.NET applications), it requires at least medium trust.

    Since dotConnect for SQL Server uses standard Microsoft .NET licensing, it additionally requires RegistryPermission. Although SecurityPermission is granted by default at the medium trust level, the set of flags for SecurityPermission must be extended. You need to add the following flags: Assertion, SkipVerification, UnmanagedCode, and SerializationFormatter.

    For information on how to do this, see Configuring Trust Level for Web Applications.