TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Prasanna Kumar Tekumudi
NA
37
3k
autofac with webapi controller registry issue
Dec 4 2019 9:51 PM
Hi All,
When i use WebApi with Autofac, every time i'm getting runtime issue that "An error occurred when trying to create a controller of type 'EmployeeController'. Make sure that the controller has a parameterless public constructor"
I'm using below autofac code in WebAPI global.asax
var builder = new ContainerBuilder();
var config = GlobalConfiguration.Configuration;
builder.RegisterApiControllers(Assembly.GetExecutingAssembly());
var container = builder.Build(); config.DependencyResolver = new AutofacWebApiDependencyResolver(container);
Can any one asisst for this?
Reply
Answers (
3
)
How to run query based on multi thread using clr function sp
Prevent DDoS Attack in Asp.MVC Application