Error when deploying

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
jlossada
Posts: 4
Joined: Tue 31 Mar 2015 22:25

Error when deploying

Post by jlossada » Thu 09 Apr 2015 05:58

Everything worked on my machine. But as soon as I deployed the web app, I am getting this error and do not know what to do! Help Please!

Code: Select all

  "Message": "An error has occurred.",
  "ExceptionMessage": "An error occurred when trying to create a controller of type 'EventsController'. Make sure that the controller has a parameterless public constructor.",
  "ExceptionType": "System.InvalidOperationException",
  "StackTrace": "   at System.Web.Http.Dispatcher.DefaultHttpControllerActivator.Create(HttpRequestMessage request, HttpControllerDescriptor controllerDescriptor, Type controllerType)\r\n   at System.Web.Http.Controllers.HttpControllerDescriptor.CreateController(HttpRequestMessage request)\r\n   at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()",
  "InnerException": {
    "$id": "2",
    "Message": "An error has occurred.",
    "ExceptionMessage": "The ADO.NET provider with invariant name 'Devart.Data.PostgreSql' is either not registered in the machine or application config file, or could not be loaded. See the inner exception for details.",
    "ExceptionType": "System.ArgumentException",
    "StackTrace": "   at System.Data.Entity.Infrastructure.DependencyResolution.DefaultProviderFactoryResolver.<GetService>b__0(ArgumentException e, String n)\r\n   at System.Data.Entity.Infrastructure.DependencyResolution.DefaultProviderFactoryResolver.GetService(Type type, Object key, Func`3 handleFailedLookup)\r\n   at System.Data.Entity.Infrastructure.DependencyResolution.DefaultProviderFactoryResolver.GetService(Type type, Object key)\r\n   at System.Data.Entity.Infrastructure.DependencyResolution.CachingDependencyResolver.<>c__DisplayClass1.<GetService>b__0(Tuple`2 k)\r\n   at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)\r\n   at System.Data.Entity.Infrastructure.DependencyResolution.CachingDependencyResolver.GetService(Type type, Object key)\r\n   at System.Data.Entity.Infrastructure.DependencyResolution.ResolverChain.<>c__DisplayClass3.<GetService>b__0(IDbDependencyResolver r)\r\n   at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()\r\n   at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)\r\n   at System.Data.Entity.Infrastructure.DependencyResolution.ResolverChain.GetService(Type type, Object key)\r\n   at System.Data.Entity.Infrastructure.DependencyResolution.RootDependencyResolver.GetService(Type type, Object key)\r\n   at System.Data.Entity.Infrastructure.DependencyResolution.ResolverChain.<>c__DisplayClass3.<GetService>b__0(IDbDependencyResolver r)\r\n   at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()\r\n   at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)\r\n   at System.Data.Entity.Infrastructure.DependencyResolution.ResolverChain.GetService(Type type, Object key)\r\n   at System.Data.Entity.Infrastructure.DependencyResolution.CompositeResolver`2.GetService(Type type, Object key)\r\n   at System.Data.Entity.Infrastructure.DependencyResolution.DbDependencyResolverExtensions.GetService[T](IDbDependencyResolver resolver, Object key)\r\n   at System.Data.Entity.Core.EntityClient.EntityConnection.ChangeConnectionString(String newConnectionString)\r\n   at System.Data.Entity.Core.EntityClient.EntityConnection..ctor(String connectionString)\r\n   at System.Data.Entity.Core.Objects.ObjectContext.CreateEntityConnection(String connectionString)\r\n   at HaplApi.Entities.HaplEntities..ctor()\r\n   at lambda_method(Closure )\r\n   at System.Web.Http.Dispatcher.DefaultHttpControllerActivator.Create(HttpRequestMessage request, HttpControllerDescriptor controllerDescriptor, Type controllerType)",
    "InnerException": {
      "$id": "3",
      "Message": "An error has occurred.",
      "ExceptionMessage": "Unable to find the requested .Net Framework Data Provider.  It may not be installed.",
      "ExceptionType": "System.ArgumentException",
      "StackTrace": "   at System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName)\r\n   at System.Data.Entity.Infrastructure.DependencyResolution.DefaultProviderFactoryResolver.GetService(Type type, Object key, Func`3 handleFailedLookup)"
    }
  }
}

Shalex
Site Admin
Posts: 8241
Joined: Thu 14 Aug 2008 12:44

Re: Error when deploying

Post by Shalex » Thu 09 Apr 2015 07:32

jlossada wrote:"ExceptionMessage": "The ADO.NET provider with invariant name 'Devart.Data.PostgreSql' is either not registered in the machine or application config file, or could not be loaded. See the inner exception for details.
You should register configuration information in the DbProviderFactories section of the *.config file of your application:

Code: Select all

<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.379.0, Culture=neutral, PublicKeyToken=09af7300eec23701" />
  </DbProviderFactories>
</system.data>
Replace 7.3.379.0 here with your actual version.

For more information, refer to http://www.devart.com/dotconnect/postgr ... yment.html.

Post Reply