PerWebRequest Lifestyle missing in Castle Windsor 3.2
Asked Answered
C

0

1

I was using PerWebRequest Lifestyle from Castle Windsor(version 3.0.0.4001). I wanted to update it to the latest version (3.2). In the latest version the, it says

does not contain a definition for 'PerWebRequest' and no extension method 'PerWebRequest' accepting a first argument of type 'Castle.MicroKernel.Registration.Lifestyle.LifestyleGroup<....

Below is how I was registering the Component, but with the latest version it throws error:

container.Register(Component.For<IUserRepository>().ImplementedBy<UserRepository>().LifeStyle.PerWebRequest);

Do I need to add any reference? Or can someone suggest which one of the Castle Windsor Lifestyle is recommended for a Web Application(where the Users use it for their daily activities like (Customer Maintenance))

Coeternity answered 26/3, 2013 at 6:0 Comment(2)
It works fine for me w/ Windsor 3.2.0. I noticed using 3.2.0 no longer need to register explicilty the httpmdoule within the web.config.Rejuvenate
Oh!!! I have done a mistake in referring the Castle.Windsor dll. I have referred the Castel.Windsor dll from net40-Client path instead of net40. Its working now after I have pointed it to the dll in net40 pathCoeternity

© 2022 - 2024 — McMap. All rights reserved.