Dependency Injection in Asp.net WebForms 4.6.2

-1

Is it possible to implement constructor dependency injection with asp.net 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=4.6.2.0, 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)"

c#
dependency-injection
webforms
asked on Stack Overflow Oct 22, 2019 by CodeVenture • edited Oct 22, 2019 by CodeVenture

1 Answer

0

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

ninject

answered on Stack Overflow Oct 22, 2019 by Wasim

User contributions licensed under CC BY-SA 3.0