Trying to deploy to Azure App Services

Posts   
 
    
goose avatar
goose
User
Posts: 392
Joined: 06-Aug-2007
# Posted on: 21-Oct-2019 03:40:45   

Hello, I've written a very simple API for our system, and we're deploying to Azure App Services, it's written in ASP.Net Full (4.7) and using LLBL 5.5.

I'm getting this error in the staging enviroment in Azure everytime I try to hit and endpoint of the API

None of the factories in the list of 'Devart.Data.MySql' were found. Please check machine.config and the .NET version your application is running on.

The type initializer for 'SD.LLBLGen.Pro.DQE.MySql.DynamicQueryEngine' threw an exception.

Please Advice.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39588
Joined: 17-Aug-2003
# Posted on: 21-Oct-2019 11:29:43   

And you can't modify the machine.config file of course... What you can do is add a factory declaration to the app/web.config file, like so:

<system.data> <DbProviderFactories> <!-- The definitions below are examples. It's likely you have to adjust the version numbers to the version the dll you're using. --> <!-- PostgreSql --> <!--<add name="PostgreSql Client Data Provider" invariant="Npgsql" description=".Net Framework Data Provider for PostgreSql" type="Npgsql.NpgsqlFactory, Npgsql, Version=3.0.2.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7"/>--> </DbProviderFactories> </system.data>

(this is for postgresql, but you get the idea). Then reference the dll in your project so it's included in the dll's in the app and can be found by .net's dll loaded (fusion) as it's not in the GAC. You might want to consult the documentation of Devart's mysqlconnect to be sure which dlls to distribute with your application.

Frans Bouma | Lead developer LLBLGen Pro