Questions tagged [autofac-module]
82 questions
0
votes
1 answer
Autofac did not intercept which type of IInterceptor
I had an issue which is I am trying to Log Interceptor using Autofac.But logaspect did not intercept. Indeed aspectInterceptor selector did not intercept when click to add method. So you can see my flow ,
After saw Jonathan's comment , I want to ask…
0
votes
1 answer
Autofac - Add registration after a registration has been added
I want to subscribe an global event which is invoked after a registration has been added.
I don't want to manually subscribe to an event for every registered service/component, because that's boilerplate code and it's easy to forget it when adding…

rene_r
- 936
- 1
- 6
- 15
0
votes
1 answer
inject module properties to dynamically registered component
When using autofac json configuration to register modules you can pass in properties and/or parameters.
{
"modules": [
{
"type": "MyProject.Core.MyModule, MyProject.Core",
"properties": {
"ModuleProperties": {
…

Christopher Taus
- 1
- 1
0
votes
1 answer
Autofac service not registered but it is
Lately I have some issues with Autofac.
I have an aggregate service like this:
public interface ICommonServices
{
IQueryBus QueryBus { get; }
ICommandBus CommandBus { get; }
INotificationBus NotificationBus { get; }
ILoggerFactory…

Luka
- 4,075
- 3
- 35
- 61
0
votes
1 answer
Replacing CastleWindsor with Autofac in .NETCore3.1
I was using CastleWindsor in my ASP.NETCore2.2 WebAPI project and was working fine. I'm migrating to ASP.NETCore3.1 now and it doesn't look like CastleWindor has offical support for that so I decided to move to Autofac with minimal changes but…

Nemesis
- 113
- 2
- 10
0
votes
1 answer
Dependency Injection into Autofac Module in .NET Core 3.0
I am quite new to creating and registering modules but I am trying to get a better understanding of the process as a whole. Currently I am trying to inject a dependency into an autofac module but I think the problem is that autofac registers its…

Damian
- 19
- 6
0
votes
1 answer
Autofac Multiple Regsistrations to Single service. Simple Injector -> Autofac translation
I've developed a CQRS style database access framework based on Tripod and other inspirations but targeting .NET Standard and simplifying for easier use. I want to split the IoC into separate integration packages so consumers can get the type…

Stephen York
- 1,247
- 1
- 13
- 42
0
votes
1 answer
Autofac: Issue with loading Module using autofac configuration
I am trying to load dependency by Autofac Configuration in my .net core3.1 project.
However, I am getting error at startup.
The type 'TPrefix.TServiceName.Messaging.MessagingModule,
TPrefix.TServiceName.Messaging' could not be found. It may…

arnab bhattacharya
- 31
- 1
- 5
0
votes
1 answer
ConfigureContainer in .NET Core 3.1 Generic Host implementation
I am trying to migrate our framework project to .NET Core 3.1.
As part of the migration, I am trying to register modules via ConfigureContainer method provided by the GenericHost.
This is what I have:
Host.CreateDefaultBuilder(args)
…

Minu
- 232
- 4
- 13
0
votes
0 answers
method to peek at registered api urls in autofac register controllers
In attempt to debug api endpoint hit, the only information I am getting via postman is 404 with message file or directory does not exist on the server (IIS by the way).
I wish there is a way to peek at registered endpoints via Autofac register…

swcraft
- 2,014
- 3
- 22
- 43
0
votes
1 answer
How does the logging module for Autofac and NLog work?
I am still fairly new to Autofac and Nlog and I need some help in understanding what is taking place in my Autofac LoggingModule for Nlog. It works as expected thanks to following the injecting-nlog-with-autofacs-registergeneric. But rather than…
user10991344
0
votes
1 answer
Register callback in Autofac and build container again in the callback
I have a dotnet core application.
My Startup.cs registers types/implementations in Autofac.
One of my registrations needs previous access to a service.
var containerBuilder = new ContainerBuilder();
containerBuilder.RegisterSettingsReaders(); //…

diegosasw
- 13,734
- 16
- 95
- 159
0
votes
1 answer
Is there way to know whether Controller is registerd with IAutofacAuthorizationFilter
We are building Authorization filter using Autofac's IAutofacAuthorizationFilter, we have register this filter in startup with our base controller. All controller inherit from our base controller. We have requirement in our execution to identify…

user145610
- 2,949
- 4
- 43
- 75
0
votes
1 answer
Unable to resolve options in startup.cs with non core project
I have asp net webapi and i'm need resolve some options in startup file. Option here has simple class what take parameters from json configuration. In startup registering the optionsAutofacModule where register configuration section what i'm need.…

QuaternioNoir
- 107
- 6
0
votes
0 answers
Could not load file or assembly MongoDB.Drive. The system cannot find the file specified
I am trying to use Mongodb in my asp.net c# application. I am using Autofac to resolve dependencies. getting the following error when autofac tries to resolve the object constructor.
autofac module detail in json:
"properties": {
…

Mukil Deepthi
- 6,072
- 13
- 71
- 156