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))

Prasad
  • 58,881
  • 64
  • 151
  • 199
  • 1
    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. – Crixo Mar 26 '13 at 08:12
  • 3
    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 path – Prasad Mar 26 '13 at 09:38

0 Answers0