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=22.214.171.124, Culture=neutral, PublicKeyToken=96c599bbe3e70f5d' is not licensed to access the Core API.
Server stack trace:
1..ctor(IConnectionPool connectionPool, IConnection connection, Func2 serializerFactory)
1..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.