Deployment problem

Deployment problem

Postby jrogovsky » Mon 10 Apr 2017 16:13

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/postgresql/docs/?Deployment.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?
jrogovsky
 
Posts: 12
Joined: Thu 06 Apr 2017 21:36

Re: Deployment problem

Postby jrogovsky » Mon 10 Apr 2017 20:06

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.
jrogovsky
 
Posts: 12
Joined: Thu 06 Apr 2017 21:36

Re: Deployment problem

Postby jrogovsky » Mon 10 Apr 2017 20:23

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?
jrogovsky
 
Posts: 12
Joined: Thu 06 Apr 2017 21:36

Re: Deployment problem

Postby Shalex » Tue 11 Apr 2017 12:21

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/postgresql/docs/?licensing.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.
Shalex
Devart Team
 
Posts: 7792
Joined: Thu 14 Aug 2008 12:44

Re: Deployment problem

Postby jrogovsky » Tue 11 Apr 2017 12:26

Ok, thank you for the clarification.
jrogovsky
 
Posts: 12
Joined: Thu 06 Apr 2017 21:36


Return to dotConnect for PostgreSQL