-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mvc Resolver is not "attaching" as expected. #17
Comments
I think the |
Hmm, good catch! I do remember my unit and integration tests for ASP.NET MVC passing though - I need to find out why those tests were passing when something like this should surely mean they shouldn't pass, hmm. I'll report back soon. |
It seems the same is true for WebApi. Nothing is setting up the DependencyResolver for that client, and I can't quite get it out of the injected space. |
I've added the fix for WebAPI support in #25. |
We are running into the same issue for WebAPI, any updates on this? |
Do any of you have a project that reproduces the issue that you can put in an emailed zip or github gist or repo? |
@StandBackBurrito ASP.NET Web API uses a different mini-resolver class than ASP.NET MVC. The code in this thread is specific to ASP.NET MVC. Can you explain how your ASP.NET Web API project is using ASP.NET MVC's resolver?
|
I was responding to @watfordgnf comment and the changes he made in #25. |
@Jehoel I have created a project setup the same way ours is. It has a VB webforms app with some webapi controllers. https://github.com/StandBackBurrito/WebApiDIRepro Let me know if you have any questions |
I've just published version https://www.nuget.org/packages/Jehoel.AspNetDependencyInjection/5.0.0-beta01 https://www.nuget.org/packages/Jehoel.AspNetDependencyInjection.Mvc/5.0.0-beta01 |
Hey all, Was this ever resolved? I have added and configured this package in an ASP.NET Web Forms project and all is good, but I just added MVC and now get this error when executing a controller. "No parameterless constructor defined for this object" UPDATE I just installed 5.0.0-beta02 and my MVC controller injection is working. Good work and thank you! |
I've been testing 5.0.0-beta02 in a .net 4.7.2 project and MVC controller injection is working. |
I tried the
AddMvcDependencyResolver
as demonstrated in theGETTING_STARTED.md
but it does not appear to work as expected.I added the Mvc Package (have been using the base fine in this web forms project for a couple of weeks now).
The text was updated successfully, but these errors were encountered: