Giter Site home page Giter Site logo

ninjectrequestscope's Introduction

NInjectRequestScope

How to use NInject with ASP.NET Web API on an OWIN Stack.

The project contains a configuration and various tests to cover the folllwing special cases. The goal is to easily understand how NInject needs to be configured to achieve the following goals:

  • One Instance per Request
  • Same instance used even if different interfaces are requested

Versions

Please use the latest Version of Ninject.Web.WebApi, See: http://stackoverflow.com/questions/28711963/ninject-activationexception-thrown-only-on-first-web-request-webapi-2-own-3-n

Package Version Note
Microsoft.AspNet.WebApi.Client 5.2.3 Client Libraries used in Tests to parse server responses
Microsoft.AspNet.WebApi.Core 5.2.3 Required by Microsoft.AspNet.WebApi.Owin
Microsoft.AspNet.WebApi.Owin 5.2.3 Summary Package
Microsoft.Owin 3.0.1 Required by Microsoft.AspNet.WebApi.Owin
Microsoft.Owin.Host.HttpListener 3.0.1 Katana
Microsoft.Owin.Hosting 3.0.1 Katana
Newtonsoft.Json 8.0.3 Obvious usage
Ninject 3.2.2.0 NINject Container
Ninject.Extensions.ContextPreservation 3.2.0.0 Required by Ninject.Web.WebApi.OwinHost
Ninject.Extensions.NamedScope 3.2.0.0 Nequired by Ninject.Web.WebApi.OwinHost
Ninject.Web.Common 3.2.3.0 Required by Ninject.Web.WebApi.OwinHost
Ninject.Web.Common.OwinHost 3.2.3.0 Required by Ninject.Web.WebApi.OwinHost
Ninject.Web.WebApi 3.2.4.0 Required by Ninject.Web.WebApi.OwinHost
Ninject.Web.WebApi.OwinHost 3.2.4.0 Web API & OWIN Integration
Owin 1.0 Required by Microsoft.Owin, Microsoft Owin.Hosting, ...

bold: directly installed italic: auto installed by dependency

Known Issues

There are at least two known bugs related to this setup. See the following articles for details

If this situations also apply to your project, I hightly recommend to not use the setup from this repository

#Author Michael Schnyder

ninjectrequestscope's People

Contributors

michaelschnyder avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.