Page 1 of 1

Deployment problem

Posted: Mon 10 Apr 2017 16:13
by jrogovsky
I recently purchased dotConnect for PostgreSQL.

I have an ASP.Net Web Forms (.Net 4.6.2) application using dotConnect (7.8.862.0) for PostgreSQL and Entity Framework (6.1.3).

I have the following in my web.config:
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="mssqllocaldb"/>
</parameters>
</defaultConnectionFactory>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/>
<provider invariantName="Devart.Data.PostgreSql" type="Devart.Data.PostgreSql.Entity.PgSqlEntityProviderServices, Devart.Data.PostgreSql.Entity.EF6, Version=7.8.862.0, Culture=neutral, PublicKeyToken=09af7300eec23701"/>
</providers>
</entityFramework>
<system.data>
<DbProviderFactories>
<remove invariant="Devart.Data.PostgreSql" />
<add name="dotConnect for PostgreSQL" invariant="Devart.Data.PostgreSql" description="Devart dotConnect for PostgreSQL" type="Devart.Data.PostgreSql.PgSqlProviderFactory, Devart.Data.PostgreSql, Version=7.8.862.0, Culture=neutral, PublicKeyToken=09af7300eec23701" />
</DbProviderFactories>
</system.data>
I have a test web server that I am trying to run the web app on.

I have run the dotConnect installer on my test web server using the "minimum" option.

When I try to run the app on my test web server, I get the following error:
The Entity Framework provider type 'Devart.Data.PostgreSql.Entity.PgSqlEntityProviderServices, Devart.Data.PostgreSql.Entity.EF6, Version=7.8.862.0, Culture=neutral, PublicKeyToken=09af7300eec23701' registered in the application config file for the ADO.NET provider with invariant name 'Devart.Data.PostgreSql' could not be loaded. Make sure that the assembly-qualified name is used and that the assembly is available to the running application. See http://go.microsoft.com/fwlink/?LinkId=260882 for more information.
I believe that I have followed all the deployment instructions here: http://www.devart.com/dotconnect/postgr ... yment.html

What am I missing?

To be clear, the web app runs fine on my dev machine.

But I need to be able to deploy it.

What are the troubleshooting steps?

Re: Deployment problem

Posted: Mon 10 Apr 2017 20:06
by jrogovsky
Ok, I figured this out by adding explicit references to the relevant DevArt dlls to my project in Visual Studio.

Not sure why it worked on my Dev PC without those references.

Re: Deployment problem

Posted: Mon 10 Apr 2017 20:23
by jrogovsky
Actually, I'd like some clarification.

In an ASP.Net Web Forms project, since I'm now copying:

- Devart.Data.dll
- Devart.Data.PostgreSql.dll
- DevArt.Data.PostgreSql.Entity.EF6

to the bin directory of my web app, do I still need to run the dotConenct installer (with the Minimum option) on my web server?

Re: Deployment problem

Posted: Tue 11 Apr 2017 12:21
by Shalex
You have two alternative options:

1. Copy Devart.Data.dll, Devart.Data.PostgreSql.dll, Devart.Data.PostgreSql.Entity.EF6.dll with your application and add the license resource to the assembly of your application: http://www.devart.com/dotconnect/postgr ... nsing.html (be aware that there is Visual Studio > Tools > PostgreSQL > License Information which helps to add license resource in design time).

OR

2. Install dotConnect for PostgreSQL with Minimum plus Entity Framework support options in your deployment environment.

Re: Deployment problem

Posted: Tue 11 Apr 2017 12:26
by jrogovsky
Ok, thank you for the clarification.