Lightswitch Deployment
Posted: Fri 24 Oct 2014 02:25
Hi,
I am having trouble deploying Visual Studio Lightswitch application that is using dotConnect for PostgreSQL. I have successfully deployed it onto my development machine but cannot get it to work on a clean system. As per the documentation I needed to do 2 things for deploying this
1. Add the appropriate .DLL files to the projects bin directory
2. Add the following to Web.Config
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.3.264.0, Culture=neutral, PublicKeyToken=09af7300eec23701" />
</DbProviderFactories>
</system.data>
The stack trace from the deployed app is as follows
[Microsoft.LightSwitch.DataService][Application:Error][LightSwitchServiceApplication.datamartData:CreateObjectContext] An exception has occurred: System.Configuration.ConfigurationErrorsException: Failed to find or load the registered .Net Framework Data Provider.
at System.Data.Common.DbProviderFactories.GetFactory(DataRow providerRow)
at System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName)
at System.Data.EntityClient.EntityConnection.GetFactory(String providerString)
at System.Data.EntityClient.EntityConnection.ChangeConnectionString(String newConnectionString)
at System.Data.EntityClient.EntityConnection..ctor(String connectionString)
at System.Data.Objects.ObjectContext.CreateEntityConnection(String connectionString)
at LightSwitchApplication.Implementation.datamartDataServiceImplementation.CreateObjectContext()
at Microsoft.LightSwitch.ServerGenerated.Implementation.DataServiceImplementation`1.get_ObjectContext()
So it looks like I am not doing something correct with the factory provider.Any help would be appreciated.
I am having trouble deploying Visual Studio Lightswitch application that is using dotConnect for PostgreSQL. I have successfully deployed it onto my development machine but cannot get it to work on a clean system. As per the documentation I needed to do 2 things for deploying this
1. Add the appropriate .DLL files to the projects bin directory
2. Add the following to Web.Config
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.3.264.0, Culture=neutral, PublicKeyToken=09af7300eec23701" />
</DbProviderFactories>
</system.data>
The stack trace from the deployed app is as follows
[Microsoft.LightSwitch.DataService][Application:Error][LightSwitchServiceApplication.datamartData:CreateObjectContext] An exception has occurred: System.Configuration.ConfigurationErrorsException: Failed to find or load the registered .Net Framework Data Provider.
at System.Data.Common.DbProviderFactories.GetFactory(DataRow providerRow)
at System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName)
at System.Data.EntityClient.EntityConnection.GetFactory(String providerString)
at System.Data.EntityClient.EntityConnection.ChangeConnectionString(String newConnectionString)
at System.Data.EntityClient.EntityConnection..ctor(String connectionString)
at System.Data.Objects.ObjectContext.CreateEntityConnection(String connectionString)
at LightSwitchApplication.Implementation.datamartDataServiceImplementation.CreateObjectContext()
at Microsoft.LightSwitch.ServerGenerated.Implementation.DataServiceImplementation`1.get_ObjectContext()
So it looks like I am not doing something correct with the factory provider.Any help would be appreciated.