Environment
Metalama.Framework Version: 2024.2.24
Runtime: .NET 8.0.401
OS: Windows Server 2016
IDE: Visual Studio Code
Issue Description
When two user login to Windows Server and run following command in Visual Studio Code terminal, metalama license list or dotnet build, only one user can do that, i.e. the first one that run the command. The second user will have error and cant do build.
Error message
System.UnauthorizedAccessException: Access to the path 'Global\Metalama.Configuration' is denied.
at System.Threading.Mutex.OpenExistingWorker(String name, Mutex& result)
at Metalama.Backstage.Utilities.MutexHelper.OpenOrCreateMutex(String mutexName, ILogger logger)
at Metalama.Backstage.Configuration.ConfigurationManager..ctor(IServiceProvider serviceProvider)
at Metalama.Backstage.Extensibility.RegisterServiceExtensions.<>c.b3_6(IServiceProvider serviceProvider)
at Metalama.Backstage.Extensibility.RegisterServiceExtensions.<>c__DisplayClass1_0`1.b0(IServiceProvider serviceProvider)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitFactory(FactoryCallSite factoryCallSite, RuntimeResolverContext context)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.CreateServiceAccessor(Type serviceType)
at System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey key, Func2 valueFactory)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType)
at Metalama.Backstage.Extensibility.ServiceProviderExtensions.GetBackstageService[TService](IServiceProvider serviceProvider)
at Metalama.Backstage.Extensibility.ServiceProviderExtensions.GetRequiredBackstageService[TService](IServiceProvider serviceProvider)
at Metalama.Backstage.Licensing.Registration.LicenseRegistrationService..ctor(IServiceProvider serviceProvider)
at Metalama.Backstage.Extensibility.RegisterServiceExtensions.<>c.b4_2(IServiceProvider serviceProvider)
at Metalama.Backstage.Extensibility.RegisterServiceExtensions.<>c__DisplayClass1_0`1.b0(IServiceProvider serviceProvider)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitFactory(FactoryCallSite factoryCallSite, RuntimeResolverContext context)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.CreateServiceAccessor(Type serviceType)
at System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey key, Func2 valueFactory)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType)
at Metalama.Backstage.Extensibility.ServiceProviderExtensions.GetBackstageService[TService](IServiceProvider serviceProvider)
at Metalama.Backstage.Extensibility.ServiceProviderExtensions.GetRequiredBackstageService[TService](IServiceProvider serviceProvider)
at Metalama.Backstage.Commands.Licensing.ListLicensesCommand.Execute(ExtendedCommandContext context, BaseCommandSettings settings)
at Metalama.Backstage.Commands.BaseCommand`1.Execute(CommandContext context, T settings)
Error: One or more errors occurred. (Access to the path 'Global\Metalama.Configuration' is denied.) (Access to the path 'Global\Metalama.Configuration' is denied.)
Environment Metalama.Framework Version: 2024.2.24 Runtime: .NET 8.0.401 OS: Windows Server 2016 IDE: Visual Studio Code
Issue Description When two user login to Windows Server and run following command in Visual Studio Code terminal, metalama license list or dotnet build, only one user can do that, i.e. the first one that run the command. The second user will have error and cant do build.
Error message System.UnauthorizedAccessException: Access to the path 'Global\Metalama.Configuration' is denied. at System.Threading.Mutex.OpenExistingWorker(String name, Mutex& result) at Metalama.Backstage.Utilities.MutexHelper.OpenOrCreateMutex(String mutexName, ILogger logger) at Metalama.Backstage.Configuration.ConfigurationManager..ctor(IServiceProvider serviceProvider) at Metalama.Backstage.Extensibility.RegisterServiceExtensions.<>c.b3_6(IServiceProvider serviceProvider)
at Metalama.Backstage.Extensibility.RegisterServiceExtensions.<>c__DisplayClass1_0`1.b 0(IServiceProvider serviceProvider)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitFactory(FactoryCallSite factoryCallSite, RuntimeResolverContext context)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitorb4_2(IServiceProvider serviceProvider)
at Metalama.Backstage.Extensibility.RegisterServiceExtensions.<>c__DisplayClass1_0`1.b 0(IServiceProvider serviceProvider)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitFactory(FactoryCallSite factoryCallSite, RuntimeResolverContext context)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor
2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor
2.VisitCallSite(ServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope) at Microsoft.Extensions.DependencyInjection.ServiceProvider.CreateServiceAccessor(Type serviceType) at System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey key, Func
2 valueFactory) at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope) at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType) at Metalama.Backstage.Extensibility.ServiceProviderExtensions.GetBackstageService[TService](IServiceProvider serviceProvider) at Metalama.Backstage.Extensibility.ServiceProviderExtensions.GetRequiredBackstageService[TService](IServiceProvider serviceProvider) at Metalama.Backstage.Licensing.Registration.LicenseRegistrationService..ctor(IServiceProvider serviceProvider) at Metalama.Backstage.Extensibility.RegisterServiceExtensions.<>c.2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor
2.VisitCallSite(ServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope) at Microsoft.Extensions.DependencyInjection.ServiceProvider.CreateServiceAccessor(Type serviceType) at System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey key, Func
2 valueFactory) at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope) at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType) at Metalama.Backstage.Extensibility.ServiceProviderExtensions.GetBackstageService[TService](IServiceProvider serviceProvider) at Metalama.Backstage.Extensibility.ServiceProviderExtensions.GetRequiredBackstageService[TService](IServiceProvider serviceProvider) at Metalama.Backstage.Commands.Licensing.ListLicensesCommand.Execute(ExtendedCommandContext context, BaseCommandSettings settings) at Metalama.Backstage.Commands.BaseCommand`1.Execute(CommandContext context, T settings) Error: One or more errors occurred. (Access to the path 'Global\Metalama.Configuration' is denied.) (Access to the path 'Global\Metalama.Configuration' is denied.)