ninject / Ninject.Web.Common

It provides the base infrastructure for all web type extension
Other
56 stars 40 forks source link

InRequestScope does not work in WCF Service Application #17

Open metasequoia opened 10 years ago

metasequoia commented 10 years ago
//does not work
Bind<IUnitOfWork>().To<UnitOfWork>().InRequestScope();

//works fine
Bind<IUnitOfWork>().To<UnitOfWork>().InScope(context => HttpContext.Current);

Version: Ninject 3.2.2.0 Ninject.Extensions.Wcf 3.2.1.0 Ninject.Web.Common 3.2.2.0

squadwuschel commented 10 years ago

thats not working for my Problem I've posted

scott-xu commented 10 years ago

Would you mind send a sample demo to me?

Jetski5822 commented 9 years ago

Think I have just hit this too - any work around guys?

scott-xu commented 9 years ago

@Jetski5822 Would you mind send a sample demo to me?

Jetski5822 commented 9 years ago

@scott-xu will try to today. I am also having problems upgrading Ninject due to Castle.Core version issues so it might be due to that. However it does dispose in a regular webapp, so not sure.

MisterGoodcat commented 8 years ago

Seems like Ninject has a general problem when it cannot rely on HttpContext for request scoping.

See: https://github.com/ninject/Ninject.Web.WebApi/issues/17