RemObjects.SDK.Server.SessionManager.GlobalSessionManager does not exist anymore in RO

I updated my RO SDK to the latest version ( but my code does not build anymore

For a local linq adapter I use the code below, however the static member data GlobalSessionManager does not exist anymore. The documentation on your website still describes this field.
What is the correct way of creating a local DA data adapter now?

public static LinqLocalDataAdapter prepareSyncMasterLocalLinqAdapter()
  var sesmgr= RemObjects.SDK.Server.SessionManager.GlobalSessionManager;
  if (sesmgr == null)
    return null;
  Guid guid = Guid.NewGuid();
  var ses = sesmgr.GetSession(guid);
  var dataAdapter = new LinqLocalDataAdapter("SyncMasterService", guid);
  return dataAdapter;

I tried
var dataAdapter = new LinqLocalDataAdapter(“SyncMasterService”, Guid.NewGuid());
but when I call ToDABindingList on a GetTable result I get a null pointer exception

I believe this is RemObjects.SDK.Server.Engine.SessionManager, now.


There was a breaking change around a year ago:

Introduced a static class RemObjects.SDK.Server.Engine. This class provides access to global SessionManager, EventSinkManager and MessageQueue instances.
Corresponding static properties were removed:

  • RemObjects.SDK.Server.SessionManager.GlobalSessionManager
  • RemObjects.SDK.Server.EventSinkManager.GlobalEventSinkManager
  • RemObjects.SDK.Server.MessageQueueManager.GlobalMessageQueueManager

This code works for me as expected for LinqLocalDataAdapter:

            var lda = new LinqLocalDataAdapter("DataService", Guid.NewGuid());
            var result = lda.GetTable<Orders>().Where(o => o.OrderDate < DateTime.Today.AddDays(-10)).Select(o => o).ToDABindingList();

            MessageBox.Show($"Result: {result.Count}");

Could you show stacktrace of the NRE you mentioned (or, even better, to create a testcase where this issue can be reproduced)?


This is the stracktrace when simply using Guid.NewGuid()

FYI: It is a ServiceRequiresLogin service, the code first class is in a dll,
the server is started with

Type[] serviceTypes=new Type[] {
typeof(SyncServer.SyncServerService) };

    serverROSuperHTTP_ = new RemObjects.SDK.Server.ApplicationServer("OffCloudServer", serviceTypes);

Could you check that the SyncMasterService service is not marked as Abstract ?
(logged an issue to raise proper exception when an Abstract service is accessed via LocalDataAdapter)

Logged as bugs://D19172.

It is defined as follows

[Service, ServiceRequiresLogin]
public class SyncMasterService : BaseDataAbstractService

The base class is defined as abstract

public class BaseDataAbstractService : DataAbstractService

FYI: I tried the RemObjects.SDK.Server.Engine.SessionManager apporach but this is also not possible because this manager value is null.
Is this expected?
Is there anything I can do now?
Should I wait for the next version?

No. RemObjects.SDK.Server.Engine.SessionManager is always set during app server initialization.

Could you create a testcase? Something similar w/o service business logic, where the issue still can be reproduced?

After debugging more I see the RemObjects.SDK.Server.Engine.SessionManager is initially null but has a value when the server is fully started. So I can solve this issue via my code.

However I have a license issue now.
Initially I got ‘No valid license has been found for BaseDataAbtractService’
After copying the licenses.licx file to the csproj that contains this class this was fixed but using DA still fails.

I now get ‘No valid license has been found for the type RemObjects.DataAbstract.RemoteCommand’ when fetching data via GetTable.

I already added extra classes to all my licenses.licx but the error remains.

How should I solve this?

RemObjects.SDK.Server.IpTcpServerChannel, RemObjects.SDK.Server
RemObjects.SDK.Server.IpSuperHttpServerChannel, RemObjects.SDK.Server
RemObjects.SDK.Server.IpHttpServerChannel, RemObjects.SDK.Server
RemObjects.SDK.Server.NamedPipeServerChannel, RemObjects.SDK.Server
RemObjects.SDK.Server.LocalServerChannel, RemObjects.SDK.Server
RemObjects.SDK.Server.HttpSysServerChannel, RemObjects.SDK.Server
RemObjects.SDK.Server.HttpSysSuperHttpServerChannel, RemObjects.SDK.Server
RemObjects.SDK.Server.SuperTcpServerChannel, RemObjects.SDK.Server
RemObjects.SDK.Server.EventSinkManager, RemObjects.SDK.Server
RemObjects.SDK.Server.MemoryMessageQueueManager, RemObjects.SDK.Server
RemObjects.SDK.Server.MemorySessionManager, RemObjects.SDK.Server
RemObjects.SDK.Server.OlympiaMessageQueueManager, RemObjects.SDK.Server
RemObjects.SDK.Server.OlympiaServerSessionManager, RemObjects.SDK.Server
RemObjects.DataAbstract.Server.ConnectionManager, RemObjects.DataAbstract.Server
RemObjects.DataAbstract.LocalDataAdapter, RemObjects.DataAbstract.Server
RemObjects.DataAbstract.Linq.LinqRemoteDataAdapter, RemObjects.DataAbstract
RemObjects.DataAbstract.RemoteDataAdapter, RemObjects.DataAbstract
RemObjects.DataAbstract.RemoteCommand, RemObjects.DataAbstract

As expected. After all setting this property is one of the server startup steps.

Probably it did mention BaseDataAdapter, as BaseDataAbtractService does not perform license checks.
Please check that licenses.licx has its Build Action set to Embedded Resource.
Is this code executed server-side or client-side?

BaseDataAbstractService is a class created by me which is derived from DataAbstractService
The problem is gone now. Not sure why. I performed full builds.
It would be nice to know what should go in theses files. Especially since they are not always automatically created/updated (when using dlls?)

There is a known issue in Visual Studio (yes, it is a Visual Studio bug) that will apparently never be fixed at all:
if there is a licenses.licx file and one have updated versions of referenced libraries - there might be license check errors because licenses.licx might not be reprocessed even after Rebuild or Clean / Build commands. The only workaround is either to delete obj and bin folders manually or to change something in the licenses.licx file.
Note: All above apllies only to .NET Framework projects, not .NET Core or .NET 5+ projects.

The minimal licenses.licx content for Data Abstract server app is

RemObjects.SDK.Server.IpHttpServerChannel, RemObjects.SDK.Server
RemObjects.DataAbstract.Server.ConnectionManager, RemObjects.DataAbstract.Server
RemObjects.DataAbstract.LocalDataAdapter, RemObjects.DataAbstract.Server
RemObjects.DataAbstract.LocalCommand, RemObjects.DataAbstract.Server

The minimal licenses.licx content for Data Abstract client app is

RemObjects.DataAbstract.RemoteCommand, RemObjects.DataAbstract
RemObjects.DataAbstract.RemoteDataAdapter, RemObjects.DataAbstract
RemObjects.DataAbstract.LinqRemoteDataAdapter, RemObjects.DataAbstract

bugs://D19172 was closed as fixed.