The type initializer for 'Elasticsearch.Net.HttpConnection' threw an exception

Hi everyone!

Sometimes, when I use Elasticsearch there is the following error (I can't reproduce it manually at all):

The type initializer for 'Elasticsearch.Net.HttpConnection' threw an exception.

The application / assembly with the name 'Elasticsearch.Net, Version=, Culture=neutral, PublicKeyToken=96c599bbe3e70f5d' is not licensed to access the Core API.

Server stack trace:
at Elasticsearch.Net.HttpConnection..ctor()
at Elasticsearch.Net.ConnectionConfiguration1..ctor(IConnectionPool connectionPool, IConnection connection, Func2 serializerFactory)
at Nest.ConnectionSettingsBase1..ctor(IConnectionPool connectionPool, IConnection connection, ISerializerFactory serializerFactory, Func2 serializerFactoryFunc)
at Nest.ConnectionSettings..ctor(IConnectionPool connectionPool, IConnection connection, ISerializerFactory serializerFactory)
at Nest.ConnectionSettings..ctor(Uri uri)

I have a c# project which is implemented in lower version of .NET Framework than I use Elasticsearch.Net.dll 5.4.0 (matched with .NET Framework 4.5). So that, I have to use a custom special class which is called by reflection from project, and mentioned special class works with Elasticserch by Nest.

Can anyone say, may be it is happening due to using reflection or there is specific bug into Elasticsearch.

Many thanks!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.