I'm using Castle Windsor and trying to use LifestylePerWebRequest. However, I need to use a factory method to create my object, so I have the following registration.
Component.For<IMyComponent>()
.UsingFactoryMethod(CreateMyComponent)
.LifestylePerWebRequest()
When I put a breakpoint in CreateMyComponent, I see it hit several times during a single request. This does not seem like the correct behavior of a PerWebRequest lifestyle. Are the two not compatible? What am I doing wrong here?