Answer the question
In order to leave comments, you need to log in
AutoFac WebAPI constructor not set?
Hello.
Interesting story with this AutoFac.
register MVC controllers:
builder.RegisterControllers(typeof(MvcApplication).Assembly);
builder.RegisterApiControllers(typeof(MvcApplication).Assembly);
// или
builder.RegisterApiControllers(Assembly.GetExecutingAssembly());
// или
builder.RegisterApiControllers(typeof(MyWebApiController).Assembly);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question