Deployment without installing to server

Deployment without installing to server

Postby HSNMatt » Mon 17 Jun 2013 20:24

We are attempting to deploy the API (which is using dotConnect Oracle) without having to install dotConnect to our server boxes. Pretty much, the less stuff that needs to be installed on production servers the better.

I have attempted to follow the licensing stuff in the help on the website, but that hasn't worked. Instead I get "Unable to load specified metadata" until I install dotConnect to the server.

Any help would be greatly appreciated. If we have to install dotConnect to the server we will, but the goal is to be able to do our deployments without having to worry about installing libraries to the server, especially if an update were to happen.
HSNMatt
 
Posts: 18
Joined: Thu 18 Apr 2013 15:30
Location: St Petersburg, FL

Re: Deployment without installing to server

Postby Shalex » Tue 18 Jun 2013 16:13

HSNMatt wrote:We are attempting to deploy the API (which is using dotConnect Oracle) without having to install dotConnect to our server boxes.

Have you compiled your application on the workstation with dotConnect for Oracle installed before deploying it on the "clean" server? Also make sure that you added a valid license resource (Tools > Oracle > License Information) and put the DbProviderFactories entry in *.config of your application: http://www.devart.com/dotconnect/oracle/docs/?deployment.html.

HSNMatt wrote:I get "Unable to load specified metadata"

Please post here the inner exception and its call stack.
Shalex
Devart Team
 
Posts: 7775
Joined: Thu 14 Aug 2008 12:44

Re: Deployment without installing to server

Postby HSNMatt » Tue 18 Jun 2013 17:10

Shalex: I can't post the call stack on here. We had to get this product working. In order for me to get the error again, I would have to uninstall on the server, or uninstall on my machine. Either way it would hinder development.

Have you compiled your application on the workstation with dotConnect for Oracle installed before deploying it on the "clean" server?

Yes. Our build server has the latest version of dotConnect Oracle installed. This is a full install.

Also make sure that you added a valid license resource (Tools > Oracle > License Information) and put the DbProviderFactories entry in *.config of your application: http://www.devart.com/dotconnect/oracle/docs/?deployment.html.

I will confirm this has been done.
HSNMatt
 
Posts: 18
Joined: Thu 18 Apr 2013 15:30
Location: St Petersburg, FL

Re: Deployment without installing to server

Postby HSNMatt » Tue 18 Jun 2013 17:22

Also make sure that you added a valid license resource (Tools > Oracle > License Information) and put the DbProviderFactories entry in *.config of your application: http://www.devart.com/dotconnect/oracle/docs/?deployment.html.


The DbProviderFactories entry is in the server's machine.config file. However I am having an issue generating a license for the application.

This is a WebAPI application... meaning, I have no idea what the .exe is that will be running this application. Does the license file have to live in the top-level project or does it have to live in the sub-project in the solution? The solution contains about 10 projects, only one of which is responsible for making the DB calls. the top-level project calls the other projects for data access.
HSNMatt
 
Posts: 18
Joined: Thu 18 Apr 2013 15:30
Location: St Petersburg, FL

Re: Deployment without installing to server

Postby HSNMatt » Tue 18 Jun 2013 20:28

We got it working, which was quite the accomplishment. Just in case anyone else is stumbling across this problem:

  • Make sure you have the 4 DLLs for dotConnect Oracle copied into the TOP-LEVEL project that is executing ("the executing assembly")... Even if they are not being used by that assembly.
  • Set the 4 dotConnect DLLs to "Copy Local" (so that they copy to the BIN directory output on build)
  • Generate a License file using the License Generation Wizard... this license file must be present on every assembly that has the DLLs being used (in my case, it was my executing assembly and the Data Access Layer project. Without it in both places, it failed. Make sure that all references to that project are included in the "executables that are using this" portion (in my case: "Data.DAL, Data.Providers, API")
  • Update the web.config file for the executing assembly to include the DbProviderFactories element. Version is not necessary to include.
    Code: Select all
    <system.data>
      <DbProviderFactories>
        <remove invariant="Devart.Data.Oracle" />
        <add name="dotConnect for Oracle" invariant="Devart.Data.Oracle" description="Devart dotConnect for Oracle" type="Devart.Data.Oracle.OracleProviderFactory, Devart.Data.Oracle, Culture=neutral, PublicKeyToken=09af7300eec23701" />
      </DbProviderFactories>
    </system.data>
  • Build and deploy the project.
HSNMatt
 
Posts: 18
Joined: Thu 18 Apr 2013 15:30
Location: St Petersburg, FL


Return to dotConnect for Oracle