Dependency Injection in WebForms 4.6.2


Is it possible to implement constructor dependency injection with webforms 4.6.2?

Tried building the container in the Global.asax >> Application_Start method. However, I encountered the below error:

"Could not load file or assembly 'Autofac, Version=, Culture=neutral, PublicKeyToken=17863af14b0044da' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)"

asked on Stack Overflow Oct 22, 2019 by CodeVenture • edited Oct 22, 2019 by CodeVenture

1 Answer


Have you tried Ninject dependency resolver. It work's great in .net Web aplication. I think you can use it. You can see the below link


answered on Stack Overflow Oct 22, 2019 by Wasim

User contributions licensed under CC BY-SA 3.0