OrleansContrib/Orleans.Providers.MongoDB

Orleans.Runtime.MembershipService.ILegacyMembershipConfigurator was not found in assembly Orleans.Providers.MongoDB

Closed this issue · 2 comments

Hi.
I'm trying to use this provider, but i'm receiving this error:

orleansmatchapi.silo_1     | Unhandled Exception: System.AggregateException: One or more errors occurred. (type Orleans.Runtime.MembershipService.ILegacyMembershipConfigurator was not found in assembly Orleans.Providers.MongoDB, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null) ---> System.InvalidOperationException: type Orleans.Runtime.MembershipService.ILegacyMembershipConfigurator was not found in assembly Orleans.Providers.MongoDB, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null
orleansmatchapi.silo_1     |    at Orleans.Messaging.LegacyGatewayListProviderConfigurator.CreateInstanceWithParameterlessConstructor[T](String assemblyName)
orleansmatchapi.silo_1     |    at Orleans.Runtime.MembershipService.LegacyMembershipConfigurator.ConfigureServices(GlobalConfiguration configuration, IServiceCollection services)
orleansmatchapi.silo_1     |    at Orleans.Hosting.LegacyClusterConfigurationExtensions.AddLegacyClusterConfigurationSupport(IServiceCollection services, ClusterConfiguration configuration)
orleansmatchapi.silo_1     |    at Orleans.Hosting.CoreHostingExtensions.<>c__DisplayClass1_0.<UseConfiguration>b__0(HostBuilderContext context, IServiceCollection services)
orleansmatchapi.silo_1     |    at Orleans.Hosting.ServiceProviderBuilder.BuildServiceProvider(HostBuilderContext context)
orleansmatchapi.silo_1     |    at Orleans.Hosting.SiloHostBuilder.Build()
orleansmatchapi.silo_1     |    at OrleansMatchAPI.Silo.OrleansHostWrapper..ctor(ClusterConfiguration config) in C:\Users\nicolas.grandchamp\source\repos\OrleansMatchAPI\OrleansMatchAPI.Silo\OrleansHostWrapper.cs:line 38
orleansmatchapi.silo_1     |    at OrleansMatchAPI.Silo.Program.<StartSilo>d__4.MoveNext() in C:\Users\nicolas.grandchamp\source\repos\OrleansMatchAPI\OrleansMatchAPI.Silo\Program.cs:line 73"

My code is:

var config = new ClusterConfiguration();

            config.Globals.LivenessType = GlobalConfiguration.LivenessProviderType.Custom;
            config.Globals.MembershipTableAssembly = "Orleans.Providers.MongoDB";

            config.Globals.ReminderServiceType = GlobalConfiguration.ReminderServiceProviderType.Custom;
            config.Globals.ReminderTableAssembly = "Orleans.Providers.MongoDB";

            config.Globals.DeploymentId = "OrleansMatchAPI";
            config.Globals.DataConnectionString = "mongodb://orleans:123@orleansmatchapi.mongodb:27017/Orleans";

            config.Globals.RegisterStorageProvider("Orleans.Providers.MongoDB.StorageProviders.MongoDBStorage", "MongoDBStore", new Dictionary<string, string>()
            {
                { "Database", "" },
                { "ConnectionString", "mongodb://orleans:123@orleansmatchapi.mongodb:27017/Orleans" }
            });

            config.Globals.RegisterStorageProvider("Orleans.Providers.MongoDB.Statistics.MongoStatisticsPublisher", "MongoStatisticsPublisher", new Dictionary<string, string>()
            {
                { "ConnectionString", "mongodb://orleans:123@orleansmatchapi.mongodb:27017/Orleans" }
            });

            config.Defaults.Port = 11111;
            config.Defaults.ProxyGatewayEndpoint = new IPEndPoint(IPAddress.Any, 30000);
            config.Defaults.StatisticsProviderName = "MongoStatisticsPublisher";
            config.Defaults.StatisticsWriteLogStatisticsToTable = false;

Hi,

What is the Orleans version that you're using? If you copy the above config into the demo application, do you experience the same issue?

git clone https://github.com/OrleansContrib/Orleans.Providers.MongoDB.git
cd Orleans.Providers.MongoDB

git checkout vNext

Checking out vNext worked.
Thanks.