This issue was supposed to be fixed in 1.2.0. We are currently using 1.2.0.11 and have encountered this issue a few times over the last 2 months...
Any ideas?
2015-04-14 05:17:12.6632 1 FATAL Autofac.Core.DependencyResolutionException: An exception was thrown while invoking the constructor 'Void .ctor(Octopus.Platform.Deployment.Configuration.IKeyValueStore, Octopus.Platform.Deployment.Configuration.ICommunicationsConfiguration, Octopus.Shared.Security.ICertificateGenerator)' on type 'TentacleConfiguration'. ---> Key not valid for use in specified state.
(See inner exception for details.) ---> System.Security.Cryptography.CryptographicException: Key not valid for use in specified state.
at System.Security.Cryptography.ProtectedData.Unprotect(Byte[] encryptedData, Byte[] optionalEntropy, DataProtectionScope scope)
at Octopus.Shared.Configuration.AbstractKeyValueStore.Get[TData](String name, TData defaultValue, Nullable1 protectionScope) in y:\work\refs\heads\master\source\Octopus.Shared\Configuration\AbstractKeyValueStore.cs:line 37 at Octopus.Shared.Configuration.TentacleConfiguration..ctor(IKeyValueStore settings, ICommunicationsConfiguration communicationsConfiguration, ICertificateGenerator certificateGenerator) in y:\work\refs\heads\master\source\Octopus.Shared\Configuration\TentacleConfiguration.cs:line 27 at lambda_method(Closure , Object[] ) at Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate() --- End of inner exception stack trace --- at Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate() at Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable1 parameters)
at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable1 parameters) at Autofac.Core.Lifetime.LifetimeScope.GetOrCreateAndShare(Guid id, Func1 creator)
at Autofac.Core.Resolving.InstanceLookup.Execute()
at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable1 parameters) at Autofac.Core.Resolving.ResolveOperation.Execute(IComponentRegistration registration, IEnumerable1 parameters)
at Autofac.Features.LazyDependencies.LazyRegistrationSource.<>cDisplayClass5`1.<>cDisplayClass7.b__4()
at System.Lazy1.CreateValue() at System.Lazy1.LazyInitValue()
at Octopus.Tentacle.Commands.NewCertificateCommand.Start() in y:\work\refs\heads\master\source\Octopus.Tentacle\Commands\NewCertificateCommand.cs:line 59
at Octopus.Shared.Startup.AbstractCommand.Octopus.Shared.Startup.ICommand.Start(String[] commandLineArguments, ICommandRuntime commandRuntime, OptionSet commonOptions) in y:\work\refs\heads\master\source\Octopus.Shared\Startup\AbstractCommand.cs:line 55
at Octopus.Shared.Startup.ConsoleHost.Run(Action`1 start, Action shutdown) in y:\work\refs\heads\master\source\Octopus.Shared\Startup\ConsoleHost.cs:line 36
This issue was supposed to be fixed in 1.2.0. We are currently using 1.2.0.11 and have encountered this issue a few times over the last 2 months...
Any ideas?
2015-04-14 05:17:12.6632 1 FATAL Autofac.Core.DependencyResolutionException: An exception was thrown while invoking the constructor 'Void .ctor(Octopus.Platform.Deployment.Configuration.IKeyValueStore, Octopus.Platform.Deployment.Configuration.ICommunicationsConfiguration, Octopus.Shared.Security.ICertificateGenerator)' on type 'TentacleConfiguration'. ---> Key not valid for use in specified state. (See inner exception for details.) ---> System.Security.Cryptography.CryptographicException: Key not valid for use in specified state.
at System.Security.Cryptography.ProtectedData.Unprotect(Byte[] encryptedData, Byte[] optionalEntropy, DataProtectionScope scope) at Octopus.Shared.Configuration.AbstractKeyValueStore.Get[TData](String name, TData defaultValue, Nullableb__4()
at System.Lazy
1 protectionScope) in y:\work\refs\heads\master\source\Octopus.Shared\Configuration\AbstractKeyValueStore.cs:line 37 at Octopus.Shared.Configuration.TentacleConfiguration..ctor(IKeyValueStore settings, ICommunicationsConfiguration communicationsConfiguration, ICertificateGenerator certificateGenerator) in y:\work\refs\heads\master\source\Octopus.Shared\Configuration\TentacleConfiguration.cs:line 27 at lambda_method(Closure , Object[] ) at Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate() --- End of inner exception stack trace --- at Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate() at Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable
1 parameters) at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable1 parameters) at Autofac.Core.Lifetime.LifetimeScope.GetOrCreateAndShare(Guid id, Func
1 creator) at Autofac.Core.Resolving.InstanceLookup.Execute() at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable1 parameters) at Autofac.Core.Resolving.ResolveOperation.Execute(IComponentRegistration registration, IEnumerable
1 parameters) at Autofac.Features.LazyDependencies.LazyRegistrationSource.<>cDisplayClass5`1.<>cDisplayClass7.1.CreateValue() at System.Lazy
1.LazyInitValue() at Octopus.Tentacle.Commands.NewCertificateCommand.Start() in y:\work\refs\heads\master\source\Octopus.Tentacle\Commands\NewCertificateCommand.cs:line 59 at Octopus.Shared.Startup.AbstractCommand.Octopus.Shared.Startup.ICommand.Start(String[] commandLineArguments, ICommandRuntime commandRuntime, OptionSet commonOptions) in y:\work\refs\heads\master\source\Octopus.Shared\Startup\AbstractCommand.cs:line 55 at Octopus.Shared.Startup.ConsoleHost.Run(Action`1 start, Action shutdown) in y:\work\refs\heads\master\source\Octopus.Shared\Startup\ConsoleHost.cs:line 36