-
Notifications
You must be signed in to change notification settings - Fork 40
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
Ninject self host WebAPI? #31
Comments
Here is my configuration that seems to break the WebAPI routes:
Changing the last two lines to
Makes the routes work but Ninject is hosed then. What am I doing wrong? Thank you. |
I see an example for WCF that includes a call like:
But I cannot seem to find an equivalent extension for WEB Api. Ideas? |
Not sure if this is still an issue, but I've had a lot of success with Ninject and WebApi using OWIN as the self-hosting infrastructure. Here's my start-up class (code to setup security has been omitted for brevity):
Here's how to set it up: |
In .NET 4.0 OWIN self host is not available. The slightly changed code from the wiki is not working:
The web server is obviously not even started. No exception, but requests created from a web browser and using HttpClient result in a connection If I do it this way instead of leveraging the NinjectSelfHostBootsrapper and use https://github.com/sethwebster/NinjectDependencyResolver/blob/master/Ninject.WebApi.DependencyResolver/NinjectDependencyResolver.cs as DependencyResolver it works.
|
In the documentation that wasn't an mention on how to create self hosted Web API with Ninject? WHat name space should I look under? Thank you.
The text was updated successfully, but these errors were encountered: