When I use this posting:
container.Register(
Component
.For<IFooFactory>()
.ImplementedBy<FooFactory>(),
Component
.For<IFoo>()
.UsingFactoryMethod(kernel => kernel.Resolve<IFooFactory>().CreateFoo())
);
I get this exception:
Castle .MicroKernel.ComponentRegistrationException: Type MyNamespace.IFoo is abstract. Therefore, it is not possible to install it as an implementation of the MyNamespace.IFoo service
I am not sure what the problem is. But the stack trace shows that in "DefaultComponentActivator.CreateInstance ()" the following condition is successful, and then an error is thrown:
if (createProxy == false && Model.Implementation.IsAbstract)
Do I need some kind of proxy server? Registration error?
source
share