I had a problem with some of my tests that resulted in registering my store twice. I'm using the store like this:
new EmbeddableDocumentStore {RunInMemory = true, UseEmbeddedHttpServer = false}
As I was registering the store twice, I was getting a System.Net.HttpListenerException: "Failed to listen on prefix 'http://<http:///>+:8080/' because it conflicts with an existing registration on the machine."
Should the HTTP listener be involved at all seeing as this is fully embedded with the HTTP server off?
> I had a problem with some of my tests that resulted in registering my
> store twice. I'm using the store like this:
> new EmbeddableDocumentStore {RunInMemory = true, UseEmbeddedHttpServer = false}
> As I was registering the store twice, I was getting
> a System.Net.HttpListenerException: "Failed to listen on prefix 'http://<http:///>+:8080/'
> because it conflicts with an existing registration on the machine."
> Should the HTTP listener be involved at all seeing as this is fully
> embedded with the HTTP server off?
SetUp : Autofac.Core.DependencyResolutionException : An exception was thrown while executing a resolve operation. See the InnerException for details. ----> System.Net.HttpListenerException : Failed to listen on prefix 'http://<http:///>+:8080/' because it conflicts with an existing registration on the machine.
at Autofac.Core.Resolving.ResolveOperation.Execute(IComponentRegistration registration, IEnumerable`1 parameters) at Autofac.Core.Lifetime.LifetimeScope.ResolveComponent( IComponentRegistration registration, IEnumerable`1 parameters) at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable`1 parameters) at Autofac.ResolutionExtensions.Resolve(IComponentContext context, IEnumerable`1 parameters) at Atlantic.Test.Common.InMemoryFixture.SetUp() in InMemoryFixture.cs: line 37<projectfile:AC63929E-BBC7-4EFA-B4CC-ECFD08D21833%2Ff%3AInMemoryFixture.c s%3F37%3F1> at Pirform.Domain.Fixture.tree_changed.Setup() in tree_changed.cs: line 25<projectfile:83F17EC4-42DD-4F0E-A93C-6E011ED127C7%2Ff%3Atree_changed.cs%3 F25%3F1> --HttpListenerException at System.Net.HttpListener.AddAllPrefixes() at System.Net.HttpListener.Start() at Raven.Database.Server.HttpServer.StartListening() in c:\Builds\RavenDB-Stable\Raven.Database\Server\HttpServer.cs: line 208 at Raven.Client.Embedded.EmbeddableDocumentStore.InitializeInternal() in c:\Builds\RavenDB-Stable\Raven.Client.Embedded\EmbeddableDocumentStore.cs: line 148 at Raven.Client.Document.DocumentStore.Initialize() in c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Document\DocumentStore.cs : line 392 at MyApp.Raven.EmbeddableDocumentStoreInitialiser.Initialise(DocumentStore documentStore) in EmbeddableDocumentStoreInitialiser.cs: line 77<projectfile:C96571B2-7A7F-474D-BFAC-7FCACFC691C2%2Fd%3ARaven%2Ff%3AEmbed dableDocumentStoreInitialiser.cs%3F77%3F1> at Atlantic.Test.Common.InMemoryFixture.<SetUp>b__1(IComponentContext x) in InMemoryFixture.cs: line 41<projectfile:AC63929E-BBC7-4EFA-B4CC-ECFD08D21833%2Ff%3AInMemoryFixture.c s%3F41%3F1> at Autofac.Builder.RegistrationBuilder. <>c__DisplayClass1`1.<ForDelegate>b__0(IComponentContext c, IEnumerable`1 p) at Autofac.Core.Activators.Delegate.DelegateActivator.ActivateInstance( IComponentContext context, IEnumerable`1 parameters) at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 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, IEnumerable`1 parameters) at Autofac.Core.Resolving.ResolveOperation.Execute(IComponentRegistration registration, IEnumerable`1 parameters)
> SetUp : Autofac.Core.DependencyResolutionException : An exception was
> thrown while executing a resolve operation. See the InnerException for
> details.
> ----> System.Net.HttpListenerException : Failed to listen on prefix '
> http:// <http:///>+:8080/' because it conflicts with an existing
> registration on the machine.
> at Autofac.Core.Resolving.ResolveOperation.Execute(IComponentRegistration
> registration, IEnumerable`1 parameters)
> at Autofac.Core.Lifetime.LifetimeScope.ResolveComponent(
> IComponentRegistration registration, IEnumerable`1 parameters)
> at Autofac.ResolutionExtensions.ResolveService(IComponentContext context,
> Service service, IEnumerable`1 parameters)
> at Autofac.ResolutionExtensions.Resolve(IComponentContext context,
> IEnumerable`1 parameters)
> at Atlantic.Test.Common.InMemoryFixture.SetUp() in InMemoryFixture.cs:
> line 37
> at Pirform.Domain.Fixture.tree_changed.Setup() in tree_changed.cs: line 25
> --HttpListenerException
> at System.Net.HttpListener.AddAllPrefixes()
> at System.Net.HttpListener.Start()
> at Raven.Database.Server.HttpServer.StartListening() in c:\Builds\RavenDB-Stable\Raven.Database\Server\HttpServer.cs:
> line 208
> at Raven.Client.Embedded.EmbeddableDocumentStore.InitializeInternal() in c:\Builds\RavenDB-Stable\Raven.Client.Embedded\EmbeddableDocumentStore.cs:
> line 148
> at Raven.Client.Document.DocumentStore.Initialize() in c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Document\DocumentStore.cs :
> line 392
> at MyApp.Raven.EmbeddableDocumentStoreInitialiser.Initialise(DocumentStore
> documentStore) in EmbeddableDocumentStoreInitialiser.cs: line 77
> at Atlantic.Test.Common.InMemoryFixture.<SetUp>b__1(IComponentContext x)
> in InMemoryFixture.cs: line 41
> at Autofac.Builder.RegistrationBuilder.
> <>c__DisplayClass1`1.<ForDelegate>b__0(IComponentContext c, IEnumerable`1
> p)
> at Autofac.Core.Activators.Delegate.DelegateActivator.ActivateInstance(
> IComponentContext context, IEnumerable`1 parameters)
> at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 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, IEnumerable`1 parameters)
> at Autofac.Core.Resolving.ResolveOperation.Execute(IComponentRegistration
> registration, IEnumerable`1 parameters)
> On Monday, 14 May 2012 14:44:00 UTC+1, Oren Eini wrote:
>> It should not, can you provide me with the full stack trace?