ninject.extensions.interception Error during load

101 views
Skip to first unread message

Sajan s

unread,
Apr 29, 2019, 5:21:58 PM4/29/19
to ninject
Hi All,

We are trying to implement interception for first time and getting below mentioned error. Any one able to help me out?

in .net console application

Error:

Error loading Ninject component IAdviceFactory

No such component has been registered in the kernel's component container.

Suggestions:

1) If you have created a custom subclass for KernelBase, ensure that you have properly

2) Ensure that you have not removed the component from the container via a call to RemoveAll().

3) Ensure you have not accidentally created more than one kernel.


Thanks & Regards,
Sajan Soosai Micheal

Bruno Juchli

unread,
Apr 29, 2019, 11:09:42 PM4/29/19
to nin...@googlegroups.com
Hi Sajan
From these, either DynamicProxyModule or LinFuModule need to be loaded. If you use automatic assembly extension, you don't need to load them manually.

Regards
 Bruno

--
You received this message because you are subscribed to the Google Groups "ninject" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ninject+u...@googlegroups.com.
To post to this group, send email to nin...@googlegroups.com.
Visit this group at https://groups.google.com/group/ninject.
For more options, visit https://groups.google.com/d/optout.

Sajan s

unread,
Apr 30, 2019, 11:40:54 AM4/30/19
to ninject
thanks for your response Juchli.

do you have any document how to load DynamicProxyModule or LinFuModule ?


On Monday, April 29, 2019 at 11:09:42 PM UTC-4, Bruno Juchli wrote:
Hi Sajan
From these, either DynamicProxyModule or LinFuModule need to be loaded. If you use automatic assembly extension, you don't need to load them manually.

Regards
 Bruno

Am Mo., 29. Apr. 2019 um 23:21 Uhr schrieb Sajan s <jess...@gmail.com>:
Hi All,

We are trying to implement interception for first time and getting below mentioned error. Any one able to help me out?

in .net console application

Error:

Error loading Ninject component IAdviceFactory

No such component has been registered in the kernel's component container.

Suggestions:

1) If you have created a custom subclass for KernelBase, ensure that you have properly

2) Ensure that you have not removed the component from the container via a call to RemoveAll().

3) Ensure you have not accidentally created more than one kernel.


Thanks & Regards,
Sajan Soosai Micheal

--
You received this message because you are subscribed to the Google Groups "ninject" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nin...@googlegroups.com.

Sajan s

unread,
Apr 30, 2019, 12:15:46 PM4/30/19
to ninject
no worries. I found that 

Sajan s

unread,
Apr 30, 2019, 12:51:59 PM4/30/19
to ninject
now interceptor called for all property and methods. it's not required to interceptor all is there any way to customize interceptor calling?

Bruno Juchli

unread,
Apr 30, 2019, 2:45:43 PM4/30/19
to nin...@googlegroups.com
try first by just installing Ninject.Extensions.Interception.DynamicProxy, just like you did with Ninject.Extensions.Interception.

If it doesn't work, add:

kernel.Load<DynamicProxyModule>();

To unsubscribe from this group and stop receiving emails from it, send an email to ninject+u...@googlegroups.com.

Sajan s

unread,
Apr 30, 2019, 2:50:40 PM4/30/19
to ninject
Thanks for your reply Junchli

yep its worked and interceptor called every properties and methods . Is it possible to customize interceptor ? mean interceptor executor specify method or property which is mentioned ReportAttributes(my own C# attributes) ?


On Tuesday, April 30, 2019 at 2:45:43 PM UTC-4, Bruno Juchli wrote:
try first by just installing Ninject.Extensions.Interception.DynamicProxy, just like you did with Ninject.Extensions.Interception.

If it doesn't work, add:

kernel.Load<DynamicProxyModule>();

Reply all
Reply to author
Forward
0 new messages